##// END OF EJS Templates
util.datestr: do not crash on revisions with negative timestamp (issue2513)...
Adrian Buehlmann -
r13039:dd24f3e7 stable
parent child Browse files
Show More
@@ -1023,6 +1023,9 b" def datestr(date=None, format='%a %b %d "
1023 1023 number of seconds away from UTC. if timezone is false, do not
1024 1024 append time zone to string."""
1025 1025 t, tz = date or makedate()
1026 if t < 0:
1027 t = 0 # time.gmtime(lt) fails on Windows for lt < -43200
1028 tz = 0
1026 1029 if "%1" in format or "%2" in format:
1027 1030 sign = (tz > 0) and "-" or "+"
1028 1031 minutes = abs(tz) // 60
General Comments 0
You need to be logged in to leave comments. Login now