--- a/mercurial/util.py Wed Nov 06 16:36:07 2013 -0600
+++ b/mercurial/util.py Thu Nov 07 15:24:23 2013 -0600
@@ -1025,9 +1025,10 @@
if t < 0:
t = 0 # time.gmtime(lt) fails on Windows for lt < -43200
tz = 0
- if "%1" in format or "%2" in format:
+ if "%1" in format or "%2" in format or "%z" in format:
sign = (tz > 0) and "-" or "+"
minutes = abs(tz) // 60
+ format = format.replace("%z", "%1%2")
format = format.replace("%1", "%c%02d" % (sign, minutes // 60))
format = format.replace("%2", "%02d" % (minutes % 60))
try: