From 1cdba927ad28b31f9b907c6cb4a41496a531ea72 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 31 Aug 2017 17:39:39 +0200 Subject: tracking: Return naive datetime objects from pb. --- modules/tracking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') 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'): -- cgit v1.2.3