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

Details about timestamps and timezones for sleep data

When getting API data for sleep we get a start time, end time, and DateOfSleep.

 

Testing showed me that the timestamps use UTC.

 

We're trying to match what the user would see on their device when it was recording. Unfortunately there's no clear way of doing this. I could pull the timezone setting from the user profile but since that could change it would throw off any timestamps recorded in a different timezone.

 

Also I had a question about "DateOfSleep". Is that based on UTC as well??

Best Answer
0 Votes
1 REPLY 1

Hi @HenryParadiz,

 

Would you please provide the sleep endpoint URL your application is executing?   The Sleep log should return data based on the timezone configured in the user's profile.  This should match what the user sees on their device.

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