mercurial/util.py
branchstable
changeset 13039 dd24f3e7ca9e
parent 13038 670f4e98276d
child 13040 44b26a87f73e
child 13053 2649be11ab0b
--- a/mercurial/util.py	Tue Nov 23 22:53:47 2010 +0100
+++ b/mercurial/util.py	Tue Nov 23 13:11:40 2010 +0100
@@ -1023,6 +1023,9 @@
     number of seconds away from UTC. if timezone is false, do not
     append time zone to string."""
     t, tz = date or makedate()
+    if t < 0:
+        t = 0   # time.gmtime(lt) fails on Windows for lt < -43200
+        tz = 0
     if "%1" in format or "%2" in format:
         sign = (tz > 0) and "-" or "+"
         minutes = abs(tz) // 60