Currently, the UTC date time in a GPX file is not parsed with UTC time zone.
A suggestion is to use the python-dateutil and replace the current parsing approach with dateutil.parser.
import dateutil.parser
def datetime_iso(string):
"""Parse an ISO formatted string. E.g:
2006-01-08T06:45:07Z
Modified by W. K. Lo 2016-06-09
Return a datetime object.
"""
dt = dateutil.parser.parse(string)
return dt
Hope this fit with other parts well!
Regards,
wklogoo
Currently, the UTC date time in a GPX file is not parsed with UTC time zone.
A suggestion is to use the python-dateutil and replace the current parsing approach with dateutil.parser.
import dateutil.parser
def datetime_iso(string):
"""Parse an ISO formatted string. E.g:
2006-01-08T06:45:07Z
Modified by W. K. Lo 2016-06-09
Hope this fit with other parts well!
Regards,
wklogoo