diff options
Diffstat (limited to 'fastimport/dates.py')
-rw-r--r-- | fastimport/dates.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fastimport/dates.py b/fastimport/dates.py index c0cf400..65223f8 100644 --- a/fastimport/dates.py +++ b/fastimport/dates.py @@ -48,11 +48,11 @@ def parse_tz(tz): :return: the timezone offset in seconds. """ # from git_repository.py in bzr-git - if len(tz) != 5: + if tz[0] not in ('+', '-'): raise ValueError(tz) sign = {'+': +1, '-': -1}[tz[0]] - hours = int(tz[1:3]) - minutes = int(tz[3:]) + hours = int(tz[1:-2]) + minutes = int(tz[-2:]) return sign * 60 * (60 * hours + minutes) |