Concept2 logbook import timestamp/zone issues
The timestamp provided is being imported as UTC but from the sessions I’ve observed, it is supposed to be in the users local timezone. Also the timestamp is for the end of the session not the start time at least for the ErgData logged sessions. It is possible other apps log them as start time so probably ok to leave as is for now.
Comments (17)
-
repo owner -
repo owner According to https://log.concept2.com/developers/documentation/#logbook-users-results you are correct
-
reporter That’s what I was looking at
. Unfortunately for interval workouts the time of the workout is does not include the rest time, but I guess it would get start time close enough.
-
repo owner - changed status to resolved
fix #594
→ <<cset 80207643cb88>>
-
reporter Looks like this has regressed. Not sure when it happened. I just noticed it as I was looking at the export to C2 issue I just logged.
-
reporter - changed status to open
-
reporter Looking back at the times, problem appears to have been re-introduced on April 6th.
-
repo owner That’s a very helpful comment. Let me check what was deployed then. However, the last deployment to production was on March 31st.
-
repo owner Looking at my commit of 2021-01-19, what I did there was moving the start time by the workout duration. However, today you also filed an Issue about the wrong timezone. https://bitbucket.org/sanderroosendaal/rowsandall/issues/616/export-to-concept2-logbook-has-wrong-time
I am wondering if there really was a regression here, or if something has been activated on the C2 side that messed things up.
-
What I am seeing is that the timestamp is correct but the timezone is set to Africa/Abidjan. Any chance it is empty and that just happens to be be the first option in the list. Maybe if one does not come through just set it to the user’s default timezone.
If I change it to my correct timezone then the date/time gets changed by the difference to Africa/Abidjan for my TZ.
-
repo owner Thanks. Useful comment. Will look at it next week
-
repo owner I have now confirmed that the C2 API has started to use the time zone field. That triggered an issue in my code. I have a path to reproduce so there is hope for a fix.
-
repo owner Carlos, did you fill out your address on log.concept2.com/profile/xxxx (your profile page)?
-
Yea my postal address is in my C2 logbook profile and is complete.
-
repo owner Carlos, please confirm that this is fixed. I am not importing from the C2 logbook myself, but my tests seem to indicate this is working now.
-
The timezone is now set to my timezone, but the timestamp is being converted which should not be happening. The time shown in the Date/Time: on the Edit Workout page is correct but the Starttime: is not. It appears to me as if you are treating the time that comes from Concept2 as UTC. I would not apply any conversion to the time that comes from the C2 Logbook (other than converting it to start time from end time which you are doing correctly) and just assume it is in the same timezone as that in the rowsandall profile.
-
repo owner Issue
#51was marked as a duplicate of this issue. - Log in to comment
The C2 API provides for a time zone field but it is never used by C2, so I decided to default to Zulu (UTC). I could investigate if I could set it to a users home time zone, but what about traveling users?
Regarding end time, let me check in the API definition