mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[enh] Use isoformat date RFC 3339
This commit is contained in:
parent
4e4fb4125b
commit
cf07c34fe3
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ class JSONExtendedEncoder(JSONEncoder):
|
||||||
|
|
||||||
# Convert compatible containers into list
|
# Convert compatible containers into list
|
||||||
if isinstance(o, datetime.datetime) or isinstance(o, datetime.date):
|
if isinstance(o, datetime.datetime) or isinstance(o, datetime.date):
|
||||||
return str(o)
|
return o.isoformat()
|
||||||
|
|
||||||
# Return the repr for object that json can't encode
|
# Return the repr for object that json can't encode
|
||||||
logger.warning('cannot properly encode in JSON the object %s, '
|
logger.warning('cannot properly encode in JSON the object %s, '
|
||||||
|
|
Loading…
Add table
Reference in a new issue