Skip to content

Commit

Permalink
Fix worklog timezone handling (#720)
Browse files Browse the repository at this point in the history
* Fix worklog timezone handling

* Update cspell.json
  • Loading branch information
GarrStau authored and hdost committed Nov 10, 2018
1 parent 28b3835 commit 72f2f6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
"trw",
"twz",
"txcwsb",
"tzinfo",
"ucfirst",
"ul",
"uname",
Expand Down
5 changes: 4 additions & 1 deletion jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1918,7 +1918,10 @@ def add_worklog(self,

if started is not None:
# based on REST Browser it needs: "2014-06-03T08:21:01.273+0000"
data['started'] = started.strftime("%Y-%m-%dT%H:%M:%S.000+0000%z")
if started.tzinfo is None:
data['started'] = started.strftime("%Y-%m-%dT%H:%M:%S.000+0000")
else:
data['started'] = started.strftime("%Y-%m-%dT%H:%M:%S.000%z")
if user is not None:
data['author'] = {"name": user,
'self': self.JIRA_BASE_URL + '/rest/api/latest/user?username=' + user,
Expand Down

0 comments on commit 72f2f6b

Please sign in to comment.