Commit 18d16423 by Yosi Taguri

convert Date to iso8601 with 3 digits microseconds

parent bf23d6f7
......@@ -149,8 +149,8 @@ class Date(ParseType):
self._date = Date._from_str(date)
def _to_native(self):
return {
'__type': 'Date', 'iso': self._date.isoformat()
return { #parse expects an iso8601 with 3 digits milliseonds and not 6
'__type': 'Date', 'iso': '{0}Z'.format(self._date.strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3])
}
......
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