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

Meaning of "Date" in Fitbit Subscription Notification

ANSWERED

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!

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

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".

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

View best answer in original post

Best Answer
0 Votes
4 REPLIES 4

Hi @yuval.altman 

 

"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.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Thank you for your response, @GordonFitbit !

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?

Best Answer
0 Votes

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".

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Thank you very much, @GordonFitbit !

Best Answer
0 Votes