dblock / strava-ruby-client

A complete Ruby client for the Strava API v3.
https://code.dblock.org/2018/11/27/writing-a-new-strava-api-ruby-client.html
MIT License
97 stars 22 forks source link

Correct start_date_local #32

Closed dblock closed 2 years ago

dblock commented 4 years ago

This is poor design from Strava.

    "start_date" : "2018-02-16T14:56:25Z",
    "timezone" : "(GMT-08:00) America/Los_Angeles",
    "start_date_local" : "2018-02-16T06:56:25Z" 

Those date/times are both ISO, but both are in UTC. If you just parse them, you'll get an incorrect value for "start_date_local" unless you only care about the hour of the day.

The correct value in this example is 2018-02-16T06:56:25-08:00.

dblock commented 2 years ago

Closed via https://github.com/dblock/strava-ruby-client/pull/39