dates: fix fractional timezone display rounding bug
authorMatt Mackall <mpm@selenic.com>
Mon, 10 Mar 2008 02:54:37 -0500
changeset 6224 210ee6204a29
parent 6223 bab6c8f2bb1a
child 6227 4c1aa6affe60
child 6231 5e5ce714ba95
dates: fix fractional timezone display rounding bug
mercurial/util.py
--- a/mercurial/util.py	Sun Mar 09 17:34:55 2008 +0000
+++ b/mercurial/util.py	Mon Mar 10 02:54:37 2008 -0500
@@ -1532,7 +1532,7 @@
     t, tz = date or makedate()
     s = time.strftime(format, time.gmtime(float(t) - tz))
     if timezone:
-        s += timezone_format % (-tz / 3600, ((-tz % 3600) / 60))
+        s += timezone_format % (int(-tz / 3600.0), ((-tz % 3600) / 60))
     return s
 
 def shortdate(date=None):