# HG changeset patch # User Sylvain Thénault # Date 1259952332 -3600 # Node ID 4b16a7c01a258823444b9ce5fd2cfb3b6b2b489c # Parent 5dd6ffc2ccaeeda1af384999bf014f4452f39a24 fix jsonization of interval diff -r 5dd6ffc2ccae -r 4b16a7c01a25 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: