Skip to content
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

Time Offset from GMT seems wrong. #226

Open
TheBig-O opened this issue Aug 4, 2024 · 8 comments
Open

Time Offset from GMT seems wrong. #226

TheBig-O opened this issue Aug 4, 2024 · 8 comments

Comments

@TheBig-O
Copy link

TheBig-O commented Aug 4, 2024

Not sure why, but when I upload a GPX file, the timezone offset seems off. I'm -4 from GMT. The time of my run was 17:37 but it shows up in the tracker as 13:37. When I try to update it, the the workout reverts to the 13:37 time.
Is this the result of the GPX offset not registering the UTC offset? Is there a way to override this?

@jovandeginste
Copy link
Owner

Can you confirm by checking the gpx file? It should have multiple times, perhaps at the top, but at least per registered point too.

@TheBig-O
Copy link
Author

TheBig-O commented Aug 4, 2024

This is the extract from the first few elements and the closing tags. Times seem to show correctly for Zulu time.

<?xml version="1.0" encoding="UTF-8"?>
<gpx creator="HealthFit" version="1.1"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1
http://www.topografix.com/GPX/11.xsd"
xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
	<trk>
		<type>running</type>
		<trkseg>
			<trkpt lat="REMOVED" lon="REMOVED">
				<ele>39.916835</ele>
				<time>2024-08-03T21:37:43.000Z</time>
				<extensions>
					<gpxtpx:TrackPointExtension>
						<gpxtpx:hr>125</gpxtpx:hr>
						<gpxtpx:cad>75</gpxtpx:cad>
						<gpxtpx:course>29.955985</gpxtpx:course>
						<gpxtpx:hAcc>2.266727</gpxtpx:hAcc>
						<gpxtpx:vAcc>1.574546</gpxtpx:vAcc>
					</gpxtpx:TrackPointExtension>
				</extensions>
			</trkpt>
			<trkpt lat="REMOVED" lon="REMOVED">
				<ele>39.870714</ele>
				<time>2024-08-03T21:37:44.000Z</time>
				<extensions>
					<gpxtpx:TrackPointExtension>
						<gpxtpx:hr>125</gpxtpx:hr>
						<gpxtpx:cad>75</gpxtpx:cad>
						<gpxtpx:course>30.739459</gpxtpx:course>
						<gpxtpx:hAcc>2.013742</gpxtpx:hAcc>
						<gpxtpx:vAcc>1.384886</gpxtpx:vAcc>
					</gpxtpx:TrackPointExtension>
				</extensions>
			</trkpt>
			<trkpt lat="REMOVED" lon="REMOVED">
				<ele>39.829204</ele>
				<time>2024-08-03T21:37:45.000Z</time>
				<extensions>
					<gpxtpx:TrackPointExtension>
						<gpxtpx:hr>128</gpxtpx:hr>
						<gpxtpx:cad>75</gpxtpx:cad>
						<gpxtpx:course>25.123236</gpxtpx:course>
						<gpxtpx:hAcc>1.864349</gpxtpx:hAcc>
						<gpxtpx:vAcc>1.235426</gpxtpx:vAcc>
					</gpxtpx:TrackPointExtension>
				</extensions>
			</trkpt>
...
				<extensions>
					<gpxtpx:TrackPointExtension>
						<gpxtpx:course>198.625878</gpxtpx:course>
						<gpxtpx:hAcc>2.397099</gpxtpx:hAcc>
						<gpxtpx:vAcc>1.340887</gpxtpx:vAcc>
					</gpxtpx:TrackPointExtension>
				</extensions>
			</trkpt>
		</trkseg>
	</trk>
</gpx>

@wills106
Copy link

wills106 commented Sep 5, 2024

This is the same as #75
image
That walk was done at 12:09 BST not 11:09

@JPDVM2014
Copy link

I'm having the same issue. My .gpx file has my correct local time with the -4 offset, but Workout Tracker adds another -4 offset. If I set Workout Tracker to GMT time, the workout times are correct.

If it helps, I'm using .gpx files from OpenTracks.

@jovandeginste
Copy link
Owner

The problem with times is there are so many points where this is parsed and can go wrong...:

  • the GPX file
  • the server hosting the workout tracker
  • the browser
  • the setting in the profile

Can you check & report all those settings?

Do I understand correctly, that some GPX files record the times in the local timezone?

@wills106
Copy link

I can understand why it's difficult. Time is a pain, especially with Summer / Winter time.

Just had a look at my GPX from lunchtime.
Local time was 12:02 BST (British Summer Time) ie GMT +1
But GPX is 2024-09-13T11:02:27Z ie GMT 0
But when viewed in FitoTrack it displays as 12:02, so it must be taking into account that the phone / app know it's BST at the moment.

@jovandeginste
Copy link
Owner

I can understand why it's difficult. Time is a pain, especially with Summer / Winter time.

Just had a look at my GPX from lunchtime. Local time was 12:02 BST (British Summer Time) ie GMT +1 But GPX is 2024-09-13T11:02:27Z ie GMT 0 But when viewed in FitoTrack it displays as 12:02, so it must be taking into account that the phone / app know it's BST at the moment.

So far so good, the data matches "reality"; now the other settings: server, browser and profile?

@wills106
Copy link

wills106 commented Sep 13, 2024

As per #75 my browser is:
image

Server:
image

As I post this it's 19:07

Edit:

Profile:
image

Edit 2:

Could it be that what ever plugin / helper you are using isn't correctly adding BST to GMT - London?
As there are two GMT 0
image

Just for added completeness I have Home Assistant running on the same server and in Docker and getting the correct time:
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants