diff --git a/logya/encoder.py b/logya/encoder.py index cef6131..a128f8b 100644 --- a/logya/encoder.py +++ b/logya/encoder.py @@ -6,10 +6,10 @@ class JSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime.datetime): - return obj.isoformat() + return obj.isoformat(sep=' ', timespec='seconds') elif isinstance(obj, datetime.date): - return obj.isoformat() + return obj.isoformat(sep=' ', timespec='seconds') elif isinstance(obj, datetime.timedelta): - return (datetime.datetime.min + obj).time().isoformat() + return (datetime.datetime.min + obj).time().isoformat(sep=' ', timespec='seconds') return json.JSONEncoder.default(self, obj)