fix typos
This commit is contained in:
parent
1d429b6d33
commit
6996f9c422
2 changed files with 4 additions and 4 deletions
|
|
@ -12,10 +12,10 @@ from ox.utils import json
|
|||
def to_json(python_object):
|
||||
if isinstance(python_object, datetime.datetime):
|
||||
if python_object.year < 1900:
|
||||
tt = python_ojbect.timetuple()
|
||||
tt = python_object.timetuple()
|
||||
value = '%d-%02d-%02dT%02d:%02d%02dZ' % tuple(list(tt)[:6])
|
||||
else:
|
||||
value = python_ojbect.strftime('%Y-%m-%dT%H:%M:%SZ')
|
||||
value = python_object.strftime('%Y-%m-%dT%H:%M:%SZ')
|
||||
return {'__class__': 'datetime.datetime',
|
||||
'__value__': value}
|
||||
if isinstance(python_object, datetime_safe.datetime):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue