mirror of
https://github.com/OpenMTC/OpenMTC.git
synced 2025-02-20 17:12:47 +00:00
updates to correct time format
This commit is contained in:
parent
f624ac1fe5
commit
2bfad1e360
@ -30,12 +30,7 @@ del logger
|
||||
|
||||
def _default(x):
|
||||
if isinstance(x, datetime):
|
||||
try:
|
||||
isoformat = x.isoformat
|
||||
except AttributeError:
|
||||
raise TypeError("%s (%s)" % (x, type(x)))
|
||||
|
||||
return isoformat()
|
||||
return x.strftime("%Y%m%dT%H%M%S")
|
||||
elif isinstance(x, ContentInstance):
|
||||
return x.resourceID
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user