mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-06 18:32:14 +02:00
filter-repo: handle ahead-of-UTC timezones too
Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
parent
307a31fd54
commit
4998de6751
@ -12,7 +12,7 @@ __all__ = ["Blob", "Reset", "FileChanges", "Commit",
|
||||
class TimeZone(tzinfo):
|
||||
"""Fixed offset in minutes east from UTC."""
|
||||
def __init__(self, offset_string):
|
||||
(minus, hh, mm) = re.match(r'^(-?)(\d\d)(\d\d)$', offset_string).groups()
|
||||
(minus,hh,mm) = re.match(r'^([-+]?)(\d\d)(\d\d)$', offset_string).groups()
|
||||
sign = minus and -1 or 1
|
||||
self._offset = timedelta(minutes = sign*(60*int(hh) + int(mm)))
|
||||
self._offset_string = offset_string
|
||||
|
Loading…
Reference in New Issue
Block a user