04-14-2019 06:56
04-14-2019 06:56
Hello,
I couldn't find any information regarding this in the documentation: in the subscription notification, what is the meaning of the "date" field? does this relate to the time in which the user started an action (e.g., started a sleep event)? the time in which the user finished an action (e.g., finished a sleep event)? the time in which the user synced the device?
Also, is the date given in UTC or in client time zone?
Thank you in advance!
Answered! Go to the Best Answer.
04-18-2019 16:48
04-18-2019 16:48
Hi @yuval.altman ,
You can execute the Get Profile endpoint, https://api.fitbit.com/1/user/-/profile.json, to find out the time zone. Search for the elements names "timezone" or "offsetFromUTCMillis".
04-16-2019 18:28
04-16-2019 18:28
"date" in the subscription webhook response is the date when the event took place or ended (in the case of sleep). You should specify this date in the appropriate URI argument to retrieve the data.
04-16-2019 23:16
04-16-2019 23:16
Thank you for your response, @Gordon-C !
So I understand that the date regards the date of the end of the sleep event, but I'm still wondering whether this date is relative to the user's local time zone, or is it in UTC?
04-18-2019 16:48
04-18-2019 16:48
Hi @yuval.altman ,
You can execute the Get Profile endpoint, https://api.fitbit.com/1/user/-/profile.json, to find out the time zone. Search for the elements names "timezone" or "offsetFromUTCMillis".
04-21-2019 23:08
04-21-2019 23:08
Thank you very much, @Gordon-C !