Activity start time not set correctly when using time shift

A place for the community to help each other out with getting the most out of the Add Time Stamps to FIT, TCX, or GPX Files Tool.
Post Reply
richco
Posts: 3
Joined: Thu Oct 21, 2021 7:22 am
Location: United Kingdom

Activity start time not set correctly when using time shift

Post by richco »

I regularly use the 'time shift' function to add times to cycling activities recorded on a spinning bike that doesn't record dates/times properly (everything starts at 00:00). It's been working great but recently I've noticed that it's now setting the activity/lap start time incorrectly - it seems to only be updating the date and hour, not minutes and seconds.

See example below from the generated TCX output. Note the Lap Start Time is (incorrectly) set to 05:00:13 whereas the first trackpoint is (correctly) set to 05:15:00. Not sure where the 13 seconds came from on the Lap Start Time either, possibly it's the current second at the time the file was processed?

Strava seems to take the start time from the first trackpoint so things appear fine on there. But Garmin and MapMyFitness use the Lap Start Time so things are logged with incorrect times and it's upsetting my OCD :D.

Can anyone provide some support/help/guidance?

Code: Select all

  <Activities>
    <Activity Sport="Biking">
      <Id>2021-10-21T05:00:13Z</Id>
      <Notes>GOTOES Export</Notes>
      <Lap StartTime="2021-10-21T05:00:13Z">
        <TotalTimeSeconds>2546</TotalTimeSeconds>
        <DistanceMeters>26260</DistanceMeters>
        <Calories>690</Calories>
        <TriggerMethod>Manual</TriggerMethod>
        <Track>
          <Trackpoint>
            <Time>2021-10-21T05:15:00Z</Time>
            <DistanceMeters>10</DistanceMeters>
            <HeartRateBpm>
             <Value>90</Value>
            </HeartRateBpm>
            <Cadence>67</Cadence>
User avatar
fulmar2
Site Admin
Posts: 255
Joined: Wed Nov 25, 2020 4:21 am
Contact:

Re: Activity start time not set correctly when using time shift

Post by fulmar2 »

Hi there -

This question may be better for the contact form as opposed to the web forum. Regardless - please send me your source files so I can find the root of the problem for you. You can either attach a file to this thread or you can write me via the contact form in my signature and I’ll let you know how to send me a file.
User avatar
fulmar2
Site Admin
Posts: 255
Joined: Wed Nov 25, 2020 4:21 am
Contact:

Re: Activity start time not set correctly when using time shift

Post by fulmar2 »

RICHCO - I went through and conducted an experiment with a time-shift on a TCX file that I already had on my computer. The tool seemed to be working as expected. My guess is that you have the "Randomize ID Tag" box checked. If you check that box, the tool will automatically shift the start time (and ID) of your lap/activity by a couple of minutes/seconds as to "trick" Strava into accepting a duplicate activity. Each time you run the tool, the activity will have a slightly different ID and start time. I figured that people would be willing to put up with this very slight difference in order to be able to upload duplicate activities to Strava. If you don't select this option, and you have another activity starting at the exact same time in your Strava account, Strava will reject it. If you want precision in your time, uncheck the box, and make sure that you don't upload duplicate activities. The tool will remember the last setting you used for this checkbox, so I'm guessing that the "recent change" you witnesses is because you inadvertently checked that box and have been continually applying this setting without noticing.
richco
Posts: 3
Joined: Thu Oct 21, 2021 7:22 am
Location: United Kingdom

Re: Activity start time not set correctly when using time shift

Post by richco »

Yes I think it was the "Randomize ID Tag" box that was doing it. Just unchecked it and tested with a couple of new rides and the times are as expected. I don't recall checking it, must have done it accidentally as you said, and then it's just remembered the setting from that point on. Thanks for pointing it out, I knew it would be something simple that I'd missed.

I figured that people would be willing to put up with this very slight difference in order to be able to upload duplicate activities to Strava.
I don't completely disagree with that statement. But with the way it works currently it yields inconsistent results across platforms. As I said, Strava ignores it and shows the start time as the time of the first trackpoint, but Garmin and MapMyFitness use your randomized Lap Start Time. I would suggest if you're going to modify the Lap Start Times it should also modify the trackpoint times accordingly so things match up and you get consistent results everywhere.

Another thought is that if people are using the timeshift function they've specifically set a start date and time for the activity. So they're probably not going to want it to be randomized. Maybe a more obvious note on screen as to the effect of checking this box might be a good idea?

They're just my thoughts, do with them as you please. I've got the answer to my question so I'm all happy now :) Thanks for your help
User avatar
fulmar2
Site Admin
Posts: 255
Joined: Wed Nov 25, 2020 4:21 am
Contact:

Re: Activity start time not set correctly when using time shift

Post by fulmar2 »

Thanks for the input.

Just to be clear, the ONLY way to get Strava to accept two activities that should have the same start time is to tweak the start time (well technically, we're not even changing the start time, we're changing the time in the ID tag) so that it doesn't match the other activity. Since these tools are called "GOTOES | Strava Tools," The idea is that they are oriented towards getting people a smooth transition from my tool to Strava. I've received several dozen messages with people saying Strava wouldn't accept their duplicate activity. Conversely, your message is the first time I've seen someone concerned about the start time. I think that is because you were using Garmin / MapMyFitness.

I think your point is good: people who are using TimeShift don't need the randomize ID tag selected. Perhaps I'll have the script auto-uncheck if it detects that the user has done a time-shift. That seems like a good idea. However, I'm not sure if people are doing serial-timeshifts... and uploading to Strava? Anyone doing that would still be disappointed that they can only load one time-shifted file. You'd be surprised how challenging it is to meet EVERYONE's needs. I get several emails per day on requests that would be contradictory. Everyone uses these tools for a different application, and I need to make them flow most easily for the largest bulk of users.

With regard to the "more obvious note on screen" you suggested: Every single feature has a blue Question Mark "?" by it.. and if you click on the "?" the user can get a detailed explanation of what that feature does and how it works. I prefer to use this less obtrusive method than putting a popup message for each feature.

Hope that helps explain a bit of the how's and why's of what is going on with the tool!
richco
Posts: 3
Joined: Thu Oct 21, 2021 7:22 am
Location: United Kingdom

Re: Activity start time not set correctly when using time shift

Post by richco »

technically, we're not even changing the start time, we're changing the time in the ID tag
Not strictly true, see the excerpt I provided before...

Code: Select all

  <Activities>
    <Activity Sport="Biking">
      <Id>2021-10-21T05:00:13Z</Id>
      <Notes>GOTOES Export</Notes>
      <Lap StartTime="2021-10-21T05:00:13Z">
        <TotalTimeSeconds>2546</TotalTimeSeconds>
        <DistanceMeters>26260</DistanceMeters>
        <Calories>690</Calories>
        <TriggerMethod>Manual</TriggerMethod>
        <Track>
          <Trackpoint>
            <Time>2021-10-21T05:15:00Z</Time>
            <DistanceMeters>10</DistanceMeters>
            <HeartRateBpm>
             <Value>90</Value>
            </HeartRateBpm>
            <Cadence>67</Cadence>
Note the <Lap StartTime="2021-10-21T05:00:13Z"> is also updated along with the Id tag. I've made an assumption this is where Garmin/MapMyFitness is getting it's activity start time from but not certain. But for consistency's sake I still think it would be better for the trackpoint times to be shifted to match the lap start time otherwise there's a 15 minute gap between the activity start time and the trackpoint time which is unaccounted for.

Perhaps I'll have the script auto-uncheck if it detects that the user has done a time-shift. That seems like a good idea.
That would certainly have fixed/prevented my issue.

However, I'm not sure if people are doing serial-timeshifts... and uploading to Strava?
I'm doing it because the spinning bikes at my gym don't have a proper clock so all activities start at 31/12/1899 00:00:00. Possibly I'm special in that respect (although they're the specific bikes used for the Les Mills Sprint/RPM virtual sessions so are likely relatively common in gyms across the world). This is actually my sole reason for using your tool, but they do the job perfectly so very grateful for you efforts.

You'd be surprised how challenging it is to meet EVERYONE's needs.
I really wouldn't. I work for one of the UK's largest software providers. I have great sympathy for you :-)

With regard to the "more obvious note on screen" you suggested: Every single feature has a blue Question Mark "?" by it.. and if you click on the "?" the user can get a detailed explanation of what that feature does and how it works. I prefer to use this less obtrusive method than putting a popup message for each feature.
Agree the question mark is there and does explain what's going on if you read it. However the reason I didn't read it was because the label of the field 'Randomize Id tag' seems pretty concise and self explanatory, I woudn't have imagined that it would also shift start times as well without your detailed explanation of how Strava works. So I can see why the question mark might be overlooked for this field. If you're thinking of making it automatically de-select the randomize checkbox when 'timeshift' is selected, then maybe combine this conditional logic with some additional text that appears on screen (i.e. not behind a question mark icon) that says "this option has been deselected because you've picked the timeshift option, see question mark icon for more info..." or something like that?


Don't take any of this as criticism, your tools are providing a lot of value for me personally and I'm very grateful for you efforts. And for you taking the time to respond. Keep up the excellent work.
User avatar
fulmar2
Site Admin
Posts: 255
Joined: Wed Nov 25, 2020 4:21 am
Contact:

Re: Activity start time not set correctly when using time shift

Post by fulmar2 »

OK, I have changed the tool so that if a user has selected "Time Shift" it will override the user's stored preference and NOT pre-check the Randomize ID tag box. This will unset the user's stored preference, however.

Currently, if the user is taking an activity directly from Strava (as opposed to uploading files), the box gets checked automatically. The reason for that is we know the user already has this file on Strava, so it is "for sure" that they will be encountering a duplicate if they are sending it back to Strava.

We will see if I start getting a lot of emails about "duplicate activity" errors again. If so, I may have to revert to the former behavior.
Post Reply