@@ 490,10 490,13 @@ class Track4PX(Carrier):
result.status = 'Delivered'
for event in payload['tracks']:
- _, tz = event['tkTimezone'].split('+')
- tz_hour, tz_min = tz.split(':')
- stamp = datetime.fromtimestamp(event['tkDate'] / 1000,
- tz=timezone(timedelta(hours=int(tz_hour, 10), minutes=int(tz_min, 10))))
+ if '+' in event['tkTimezone']:
+ _, tz = event['tkTimezone'].split('+')
+ tz_hour, tz_min = tz.split(':')
+ stamp = datetime.fromtimestamp(event['tkDate'] / 1000,
+ tz=timezone(timedelta(hours=int(tz_hour, 10), minutes=int(tz_min, 10))))
+ else:
+ stamp = datetime.utcfromtimestamp(event['tkDate'] / 1000)
e = PackageEvent(stamp, event['tkLocation'], event['tkDesc'])
result.events.append(e)