Concept2 logbook import timestamp/zone issues

Issue #594 open
Carlos Reategui created an issue

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)

  1. Sander Roosendaal repo owner

    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

  2. Carlos Reategui 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.

  3. Carlos Reategui 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.

  4. Carlos Reategui reporter

    Looking back at the times, problem appears to have been re-introduced on April 6th.

  5. Sander Roosendaal 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.

  6. Carlos Reategui

    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.

  7. Sander Roosendaal 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.

  8. Sander Roosendaal 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.

  9. Carlos Reategui

    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.

  10. Log in to comment