Skip to content

Convert GPX normalized time to local time

April 2, 2012

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:

  1. Read the normalized date and time out of one or more GPX export file track points
  2. Use the latitude and longitude in those track points to derive local time zone offset(s)
  3. 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.


From → Uncategorized

Comments are closed.

%d bloggers like this: