-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing GPX/KML ignores timestamps with timeoffset #15271
Comments
While it is no big deal to expand our parser, I am not entirely convinced it is really in the topografix standard?! ISO 8601 specifies 3 possible options for time zone designators, called:
And http://www.topografix.com/gpx.asp states: "Date and time in are in Universal Coordinated Time (UTC), not local time! Conforms to ISO 8601 specification for date/time representation." By saying "Universal Coordinated Time (UTC)" they literally reference option 2 above as worded in ISO 8601. |
thanks for the quick feedback! My argument is that 2. and 3. are actually the same: 14:45:15Z == 14:45:15+00:00. This is how it is handled by KML2.3: https://docs.opengeospatial.org/is/12-007r2/12-007r2.html |
@sonora we can change here https://github.com/osmandapp/OsmAnd/blob/master/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java#L78 seems to work but needs to be tested on different phones
|
We have (public) parseTime and formatTime methods in GPXUtilities.java. If anything, I would not change it in general (i.e. for GPX writing), since it is clearly the standard. Could think about adding this to our parser so these kind of tracks are correctly understood when read. |
Yes, you are right, we shouldn't change writing though as I see
|
Looks like we "half" support it (I just tried an OsmAnd-recorded file, replacing all "
So it's a partial flaw we could fix, spending some effort to check where things work and where they fail... |
did you change it? I think it's not broken totally but this format
|
Would recommend to use this as it is more descriptive (and is less custom): |
Well fixed as is from what I see - works flawless for all tests I can think of.👍 |
Description
As v3.2.4, OpenTracks exports timestamps with time offset at recording time.
Timestamps are exported as
xsd:dateTime
as definde by KML and GPX: https://www.topografix.com/gpx/1/1/Examples:
OSMAnd only seems to support timestamps with Zulu time.
Please add full support for
xsd:dateTime
.We got the report here: OpenTracksApp/OpenTracks#1370
How to reproduce?
Import a GPX/KML with time offset.
Track will be shown, time-related statistics will be missing.
Your Environment
OsmAnd Version: v4.1.11
The text was updated successfully, but these errors were encountered: