Show More
@@ -41,14 +41,15 b' class changelog(revlog):' | |||
|
41 | 41 | if date: |
|
42 | 42 | # validate explicit (probably user-specified) date and |
|
43 | 43 | # time zone offset. values must fit in signed 32 bits for |
|
44 | # current 32-bit linux runtimes. | |
|
44 | # current 32-bit linux runtimes. timezones go from UTC-12 | |
|
45 | # to UTC+14 | |
|
45 | 46 | try: |
|
46 | 47 | when, offset = map(int, date.split(' ')) |
|
47 | 48 | except ValueError: |
|
48 | 49 | raise ValueError(_('invalid date: %r') % date) |
|
49 | 50 | if abs(when) > 0x7fffffff: |
|
50 | 51 | raise ValueError(_('date exceeds 32 bits: %d') % when) |
|
51 |
if |
|
|
52 | if offset < -50400 or offset > 43200: | |
|
52 | 53 | raise ValueError(_('impossible time zone offset: %d') % offset) |
|
53 | 54 | else: |
|
54 | 55 | date = "%d %d" % util.makedate() |
General Comments 0
You need to be logged in to leave comments.
Login now