Don't strip microseconds in JSON output.

This commit is contained in:
Tom Christie 2016-07-11 13:50:25 +01:00
parent 7bfa5a9141
commit 9164c3b340

View File

@ -28,8 +28,6 @@ class JSONEncoder(json.JSONEncoder):
return force_text(obj)
elif isinstance(obj, datetime.datetime):
representation = obj.isoformat()
if obj.microsecond:
representation = representation[:23] + representation[26:]
if representation.endswith('+00:00'):
representation = representation[:-6] + 'Z'
return representation