Skip to content

Commit

Permalink
JSON serialization of datetime only supports UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
hjacobs committed Jul 31, 2015
1 parent 468eb89 commit a6d0ba5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion connexion/decorators/produces.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
class JSONEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, datetime.datetime):
return o.isoformat('T')
# only supports UTC timestamps
return o.isoformat('T') + 'Z'
return json.JSONEncoder.default(self, o)


Expand Down

0 comments on commit a6d0ba5

Please sign in to comment.