diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/tracking.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/tracking.py b/modules/tracking.py index 5ba09b2..1d6a5f7 100644 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -219,11 +219,11 @@ class TollpostModule(TrackingModule): code = item['itemId'] delivered = (item['status'] == 'DELIVERED') lastevent = item['events'][-1] - date = lastevent['eventTime'].replace('T', ' ') + date = datetime.datetime.strptime(lastevent['eventTime'], '%Y-%m-%dT%H:%M:%S') event = lastevent['eventDescription'] location = lastevent['location']['name'] status = '%s (%s)' % (event, location) - results.append(TrackingResult(code, date, status, delivered)) + results.append(TrackingResult(code, date, status.encode('utf-8'), delivered)) return results def code_split(code): |