Correct activity time?

I’m trying to debug some various issues & one quick test I thought of was to add the time of the activity to its page. It’s right next to the date.

If you’re outside of the Eastern time zone, is the time listed there correct for you?

Related issue: Timezone for activities?

My latest run says 9.36 am, but i ran at 3.36 pm

It is an older activity, but this activity shows 2:21am on CS (EDT) but 8:21a local time on Strava

Thanks @jpbari & @hjkiddk I’ve been able to confirm that the database stores the correct time in UTC.

I need to figure out the best way to get it back into local time at the points where I need it. Your run in Cannes highlights how I can’t rely on the browser’s local time - I need to know the time zone of the activity.


1 Like

All of my runs display in UK time (NOT UTC) as far as I can tell.

This event started Saturday Nov 7 at 12:00 midday in the timezone where I raced. For me, the activity page says I started Nov 6 at 9:00pm. Something is screwed up, because 12:00 midday would have been 2am in London BST.

Try this one

The activity page says October 23 4:58pm but I actually started it locally 24th October 24 @ 6:58am

I think this still tracks with everything else I’ve seen so far:

  • Time is stored in UTC in the database … this is not visible to you, just a technical detail that your activity from October 24 @ 6:58am is stored in the database as 2020-10-23 20:58:31+00
  • Time is displayed on the page in Eastern Time

I think what I have to do is store the time zone for the activity & use that when showing it in the browser.

1 Like

Oh, you’re American? :wink:
Well, that explains the Eastern timezone…, I thought you were British.
Anyway, why do you need to store activities in UTC, why not do it the simple way and only store the local time in the local zone where the activity took place? Does it matter what UTC was? Surely the database will either re-sort the entries by time, or simply your algorithms won’t care if the entries come in a bit jumbled (from a local time point of view). Alternatively, suggest you capture the UTC activity time and the local start time. Forget about the time zone it was run in… they are so finicky and how will you know ??? the watch doesn’t tell you… you’ll need to know exact GPS coordinates because for one of those events I gave you, I was less than 5 miles from the state boundary and a timezone change.If I was using a phone to record strava no doubt it would have got the wrong timezone from the cell phone tower because it would have been closest (except, I had no phone service…)

My web framework does a really good job of normalizing datetime values on the way into the database, so I never have to guess about the data at rest - it’s always UTC. It’s one of those things that’s better to just conform to.

That’s more or less what should be happening, albeit with some enforced consistency. I send in either a UTC timestamp (that’s what some services give me) or the local time (that’s what some services give me) and the web framework does the job of making sure everything is saved as UTC.

Not all services provide this information.

Garmin sends me the start time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp) … along with three paragraphs of caveats. :grimacing: :sweat_smile:

Yeah, one idea I have right now is to take the first coordinate of the activity to determine its time zone.

All that said, I’m realizing after some research that - up until the LifeMap time filter - I’ve pretty purposefully ignored the idea of time. Between the time filter and the Challenges, nothing much else worries about the time of the activity (with some edge cases where the date displayed would be wrong).

I dug into how each of the services send me the start time, and :sweat: :flushed: oh no. Garmin & Strava both send me a sane UTC value. Strava sends a verbose time zone entry. Runkeeper sends me local time, with an entry for the UTC offset (that I’ve been ignoring since 2013 :man_facepalming:) MapMyFitness is being as unhelpful as possible by giving me a fully formatted timestamp value that uses the wrong time zone paired a text-version time zone entry.

I don't like this


I can confirm the time here ( )
is one hour later than the actual event ( ).


I did start my Garmin at 5:28 PM CST.

Edit: Should have read James’ last post. I thought data/confirmation was still needed.

One way is on Citystrides website just say “estimated activity date” :grinning: +/- 1 day