fix jsonization of interval stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 04 Dec 2009 19:45:32 +0100
branchstable
changeset 4000 4b16a7c01a25
parent 3999 5dd6ffc2ccae
child 4001 bc31ede2085d
fix jsonization of interval
utils.py
--- a/utils.py	Fri Dec 04 19:45:19 2009 +0100
+++ b/utils.py	Fri Dec 04 19:45:32 2009 +0100
@@ -410,7 +410,7 @@
             elif isinstance(obj, pydatetime.time):
                 return obj.strftime('%H:%M:%S')
             elif isinstance(obj, pydatetime.timedelta):
-                return '%10d.%s' % (obj.days, obj.seconds)
+                return (obj.days * 24 * 60 * 60) + obj.seconds
             elif isinstance(obj, decimal.Decimal):
                 return float(obj)
             try: