changeset 6224:210ee6204a29

dates: fix fractional timezone display rounding bug
author Matt Mackall <mpm@selenic.com>
date Mon, 10 Mar 2008 02:54:37 -0500
parents bab6c8f2bb1a
children 4c1aa6affe60 5e5ce714ba95
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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):