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

This commit is contained in:
Tom Christie 2013-03-20 13:05:59 +00:00
parent 09e4ee7ae3
commit 20fd738c85

View File

@ -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)