Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Time Series API: Confusion around Time Zone for "today"

ANSWERED

My question is in regards to the Time Series API. Specifically, I would like to know what time zone we are supposed to treat the special date string "today" as. Is the date that is treated as "today" going to be the date in the time zone of the Fitbit API servers, the time zone of my own application/server, or the local time zone set on the user account I'm requesting access for?

 

Consider right now for example. I am located in an EST area and it is April 1 at ~ 12:15 AM. I am running a Time Series request on a user who's local time zone is set to PST, so it is still March 31 in that time zone. I request data with a fixed base date last week (in this case, 2015-03-24) and an end date of "today".

 

As such, what will the last date of the data be? Will it be April 1 or will it be March 31?

 

Thanks a lot!

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

A Fitbit user's data is stored as a 24 hour series. It is timezoneless. Data is stored at whatever time is on the device at the time of activity.

 

You can find the current UTC offset of the user with Get User Info and calculate the "today" date for the user.

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

A Fitbit user's data is stored as a 24 hour series. It is timezoneless. Data is stored at whatever time is on the device at the time of activity.

 

You can find the current UTC offset of the user with Get User Info and calculate the "today" date for the user.

Best Answer
0 Votes