summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2017-08-31 17:39:39 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2017-08-31 17:39:39 +0200
commit1cdba927ad28b31f9b907c6cb4a41496a531ea72 (patch)
treee6237ef6f98c554966da553ae7ecfd43235760d7 /modules
parentc17e839b7b7e91e4720ea1192877c8b87709aa38 (diff)
tracking: Return naive datetime objects from pb.
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/tracking.py2
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'):