Commit 20fd738c by Tom Christie

iso formated datetime aware fields with +0000 offset should use 'Z' suffix instead

parent 09e4ee7a
......@@ -609,7 +609,10 @@ class DateTimeField(WritableField):
return None
if self.format.lower() == ISO_8601:
return value.isoformat()
ret = value.isoformat()
if ret.endswith('+00:00'):
ret = ret[:-6] + 'Z'
return ret
return value.strftime(self.format)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment