##// END OF EJS Templates
makedate: abort on negative timestamps (issue2513)...
Adrian Buehlmann -
r13063:e98581d4 stable
parent child Browse files
Show More
@@ -1015,7 +1015,11 b' def makedate():'
1015 tz = time.altzone
1015 tz = time.altzone
1016 else:
1016 else:
1017 tz = time.timezone
1017 tz = time.timezone
1018 return time.mktime(lt), tz
1018 t = time.mktime(lt)
1019 if t < 0:
1020 hint = _("check your clock")
1021 raise Abort(_("negative timestamp: %d") % t, hint=hint)
1022 return t, tz
1019
1023
1020 def datestr(date=None, format='%a %b %d %H:%M:%S %Y %1%2'):
1024 def datestr(date=None, format='%a %b %d %H:%M:%S %Y %1%2'):
1021 """represent a (unixtime, offset) tuple as a localized time.
1025 """represent a (unixtime, offset) tuple as a localized time.
General Comments 0
You need to be logged in to leave comments. Login now