diff options
Diffstat (limited to 'glucometerutils/support/construct_extras.py')
-rw-r--r-- | glucometerutils/support/construct_extras.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/glucometerutils/support/construct_extras.py b/glucometerutils/support/construct_extras.py index cb42105..6d4e302 100644 --- a/glucometerutils/support/construct_extras.py +++ b/glucometerutils/support/construct_extras.py @@ -23,11 +23,11 @@ class Timestamp(construct.Adapter): super(Timestamp, self).__init__(subcon) self.epoch = epoch - def _encode(self, obj, context): + def _encode(self, obj, context, path): assert isinstance(obj, datetime.datetime) epoch_date = datetime.datetime.utcfromtimestamp(self.epoch) delta = obj - epoch_date return int(delta.total_seconds()) - def _decode(self, obj, context): + def _decode(self, obj, context, path): return datetime.datetime.utcfromtimestamp(obj + self.epoch) |