Show More
@@ -33,10 +33,13 b' class changelog(revlog):' | |||
|
33 | 33 | user=None, date=None): |
|
34 | 34 | if date: |
|
35 | 35 | # validate explicit (probably user-specified) date and |
|
36 | # time zone offset | |
|
36 | # time zone offset. values must fit in signed 32 bits for | |
|
37 | # current 32-bit linux runtimes. | |
|
37 | 38 | when, offset = map(int, date.split(' ')) |
|
38 | time.localtime(when) | |
|
39 | assert abs(offset) < 43200, 'bad time zone offset: %d' % offset | |
|
39 | if abs(when) > 0x7fffffff: | |
|
40 | raise ValueError('date exceeds 32 bits: %d' % when) | |
|
41 | if abs(offset) >= 43200: | |
|
42 | raise ValueError('impossible time zone offset: %d' % offset) | |
|
40 | 43 | else: |
|
41 | 44 | if time.daylight: offset = time.altzone |
|
42 | 45 | else: offset = time.timezone |
General Comments 0
You need to be logged in to leave comments.
Login now