diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2017-08-31 17:39:39 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2017-08-31 17:39:39 +0200 |
commit | 1cdba927ad28b31f9b907c6cb4a41496a531ea72 (patch) | |
tree | e6237ef6f98c554966da553ae7ecfd43235760d7 /modules | |
parent | c17e839b7b7e91e4720ea1192877c8b87709aa38 (diff) |
tracking: Return naive datetime objects from pb.
Diffstat (limited to 'modules')
-rwxr-xr-x | modules/tracking.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/tracking.py b/modules/tracking.py index 7d2ef32..70c85b0 100755 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -384,7 +384,7 @@ class PitneyBowes(TrackingModule): raise PackageError(str(e)) data = response.json() date = dateutil.parser.parse('%sT%s' % (data['currentStatus']['eventDate'], data['currentStatus']['eventTime'])) - date = date.astimezone(pytz.timezone(config.get(cfg_section, 'local_timezone'))) + date = date.astimezone(pytz.timezone(config.get(cfg_section, 'local_timezone'))).replace(tzinfo = None) desc = data['currentStatus']['eventDescription'] location = data['currentStatus']['eventLocation'].get('city') or '' if location and data['currentStatus']['eventLocation'].get('country'): |