03-31-2015 21:19
03-31-2015 21:19
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!
Answered! Go to the Best Answer.
04-24-2015 16:37
04-24-2015 16:37
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.
04-24-2015 16:37
04-24-2015 16:37
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.