diff -r 670f4e98276d -r dd24f3e7ca9e mercurial/util.py --- 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