OpenTracks: Update: add UI for changing the time offset of a track (determining it from GPX doesn't work as well as it could)

Describe the bug

Importing a recorded activity from Gadgetbridge causes OpenTracks to store it without converting the time from UTC to the local timezone. The metadata <time></time> in the exported gpx is incorrectly set to the export time and lacks a Z at the end, but OpenTracks appears to use the first trkpt <time></time>, which does have the correct UTC time with a Z at the end (eg: <time>2024-11-05T04:09:10Z</time>).

Here’s the connected issue @ Gadgetbridge: https://codeberg.org/Freeyourgadget/Gadgetbridge/issues/4299

To Reproduce

  1. Record an activity using a Gadgetbridge-connected device
  2. Go into Gadgetbridge and select the “Your activity tracks” option for the device
  3. Sync activities
  4. Select the activity you recorded
  5. Click the share button and select “Share GPS Track”
  6. Share to OpenTracks
  7. Observe the imported track showing the non-timezone-corrected time

Technical information

  • Device: Pixel 7
  • OS: GrapheneOS (latest, Android 15)
  • OpenTracks version: v4.14.0

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Gadgetbridge shares the track as gpx, not kml. The timestamps are formated as ISO8601, in UTC, following the gpx and xml specs.