let iso8601date handle strings
This commit is contained in:
parent
f04a133cd7
commit
30fac51ca6
|
@ -32,6 +32,8 @@ ignored = 'use_solr', '-C'
|
|||
|
||||
def iso8601date(value):
|
||||
""" convert `DateTime` to iso 8601 date format """
|
||||
if isinstance(value, str):
|
||||
value = DateTime(value, datefmt='international')
|
||||
if isinstance(value, DateTime):
|
||||
v = value.toZone('UTC')
|
||||
value = '%04d-%02d-%02dT%02d:%02d:%06.3fZ' % (
|
||||
|
|
Loading…
Reference in New Issue