-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Some gpx files use the time format <time>2010-07-18T15:21:41+01:00</time> which
breaks your script at the moment.
You might consider using the parser from the python dateutil module which will
handle virtually any time format.
e.g.:
from dateutil import parser
def prettify_time(time):
time = parser.parse(time)
if tzname:
time=time.replace(tzinfo=pytz.utc)
time=time.astimezone(pytz.timezone(tzname))
return time
Original issue reported on code.google.com by mark.opu...@googlemail.com on 23 Jul 2010 at 5:13