Training Load

by mechgt

Downloads: 12,931 (48) • Reviews: 18




Aug 26, 2015

Time Zone Handling problem

Time Zone Handling problem

Postby GregTR » Fri Sep 02, 2011 11:13 am

This is a bug that probably most people won't find or care about. But anyone who travels to different continents and ends up working out there will probably find it.

For every exercise there is the time of the exercise and there is a time zone that corresponds with that exercise. The problem is that Training Load only looks at the time of the exercise and the time zone of the computer that the user uses instead of the time zone of the exercise.

So for example, I live in TX which is UTC-6 in the winter and UTC-5 in the summer during daylight savings. I have my computer set to this time zone. I also travel to Europe sometime and it means I will work out there. Most of Europe is UTC+1 or UTC+2 in the summer.

So most of my workouts are in the US but when I exercise in Europe I tend to exercise in the morning, let's say I work out on 08/08/11 at 06:30 UTC+1 while in Europe. That time is actually 08/07/11 23:30 UTC-6, the local time of my PC. So Training Load will log it and display it as if I did that exercise on 8/7/11 just before midnight instead of treating it as a morning workout on 8/8/11. So if I ran in Europe on 8/7/11 at 08:00 UTC+1 then at 8/8/11 at 06:30 UTC+1, in Training Load these two exercises will both show up on 8/7/11 and it will look like I did a double workout while I did not exercise on 8/8/11 at all.

Note that several other plugins have this problem as well.
Posts: 40
Joined: Fri Jan 15, 2010 12:26 am

Re: Time Zone Handling problem

Postby old_man_biking » Fri Sep 02, 2011 3:04 pm

While ST2 didn't care much about time zones, ST3 has improved time zone support.
Whenever you create (i.e. import) an activity, the time zone offset (vs. UTC) of the current activity is stored with the activity.
So as long as you import activities while your computer is still set to the time zone where you performed the work out, ST has the correct time zone setting for your work out.
ST however does all this "back stage", you'll never see this time zone information in the user interface. I've added an action to my Weather plugin that can display and change time zone offset (e.g. when you've imported activities when your PC was already set to another (= wrong) time zone.

Plugins can of course use this time zone offset information to display correct local time for activities.

Posts: 6505
Joined: Mon May 28, 2007 8:07 am
Location: Munich, Germany

Re: Time Zone Handling problem

Postby GregTR » Fri Sep 02, 2011 3:30 pm

OMB, absolutely correct. I do use the Weather plugin and I did welcome the addition of the time zone fix you implemented! Thank you. I was the one who pointed out this problem with the weather plugin (or ultimately in ST3) and got the fix for which I'm grateful for. I used this feature extensively last month while traveling in Europe and uploading my workouts to my home PC that was back in Texas on local time.

Unfortunately other plugins don't play nice and have issues with the corrected (or uncorrected, depending on how you look at it) time zones and local times. The weather plugin works fantastic now and my workouts also show up correctly in ST3 everywhere except in some plugins such as Training Load which clearly don't handle the situation right.
Posts: 40
Joined: Fri Jan 15, 2010 12:26 am

Return to Training Load

Who is online

Users browsing this forum: No registered users and 2 guests