diff options
author | Uwe L. Korn <uwelk@xhochy.com> | 2019-10-19 11:36:00 +0200 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2019-10-19 13:20:43 +0200 |
commit | 6fd090293792884f5a0d05f69109da1c970c3cab (patch) | |
tree | e3c8ae96a7c371b4c08f54cd66a690032906705c /git/objects/util.py | |
parent | 95897f99551db8d81ca77adec3f44e459899c20b (diff) | |
download | gitpython-6fd090293792884f5a0d05f69109da1c970c3cab.tar.gz |
Fix pickling of tzoffset
Fixes #650
Diffstat (limited to 'git/objects/util.py')
-rw-r--r-- | git/objects/util.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git/objects/util.py b/git/objects/util.py index 7b6a2763..5dbd9822 100644 --- a/git/objects/util.py +++ b/git/objects/util.py @@ -105,6 +105,9 @@ class tzoffset(tzinfo): self._offset = timedelta(seconds=-secs_west_of_utc) self._name = name or 'fixed' + def __reduce__(self): + return tzoffset, (-self._offset.total_seconds(), self._name) + def utcoffset(self, dt): return self._offset |