tkrajina / gpxpy

gpx-py is a python GPX parser. GPX (GPS eXchange Format) is an XML based file format for GPS tracks.
Apache License 2.0
993 stars 223 forks source link

Unable to parse time with 9 decimals #174

Closed TorbenDyrby closed 4 years ago

TorbenDyrby commented 5 years ago

I have time with 9 decimals, e.g.

I suggest the following change to gpxfield.py: RE_TIMESTAMP = mod_re.compile( r'^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})T :([0-9]{1,2}):([0-9]{1,2})' r'(.[0-9]+)?(Z|[+-−][0-9]{2}:?(?:[0-9]{2})?)?$')

I know the remaining decimal(s) wont be used, but it is still better to be able to parse the time.

tkrajina commented 4 years ago

Fixed in https://github.com/tkrajina/gpxpy/commit/5255351600ffb48c17bc3e5ce7709ba0d58f1930 .