Convert GPX normalized time to local time
We sometimes get questions about how to figure out the local time for fitness activities exported as part of a user data export.
Time and date information included in exported GPX files are normalized to universal time. See below for an example showing normalized times such as 2012-03-24T06:12:45Z
.
Here are the steps you would follow to convert from universal time to local time:
- Read the normalized date and time out of one or more GPX export file track points
- Use the latitude and longitude in those track points to derive local time zone offset(s)
- Convert the universal time values in the GPX files into local time using the offset(s)
That’s all there is to it!
Cross-posted from the Health Graph blog.
Comments are closed.