Skip to content

Date time parsing issue #5

@wklogoo

Description

@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

Return a datetime object.
"""
dt = dateutil.parser.parse(string)
return dt

Hope this fit with other parts well!

Regards,
wklogoo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions