04-14-2019 06:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-14-2019 06:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.

- Labels:
-
Subscriptions API
Accepted Solutions
04-18-2019 16:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



04-18-2019 16:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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".
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

04-16-2019 18:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



04-16-2019 18:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
"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.
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

04-16-2019 23:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-16-2019 23:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



04-18-2019 16:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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".
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

04-21-2019 23:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-21-2019 23:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thank you very much, @Gordon-C !

