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

Webhook Sleep Data Notification Date Issues with Timezone

I'm a developer from Japan working with the Fitbit Web API to receive sleep data update notifications via webhooks.
I'm experiencing timezone-related issues and would appreciate any advice from the community.

Issue Description:

Case 1 (Date shows as previous day):

  • Sleep time: July 9th 00:30 - 06:30 (Japan Standard Time, UTC+9)
  • Webhook notification: Sleep data for July 8th updated
  • Result: Querying July 8th data → No data found, Querying July 9th data → Data exists

Case 2 (Working correctly):

  • Sleep time: July 14th 00:30 - 09:30 (Japan Standard Time, UTC+9)
  • Webhook notification: Sleep data for July 14th updated
  • Result: Querying July 14th data → Data retrieved successfully

Environment:

  • Fitbit device: Inspire2, Timezone set to Tokyo/Asia
  • Location: Japan (UTC+9)

Observed:

  1. Webhook notification dates appear to be calculated based on UTC
  2. This issue doesn't occur with manually entered sleep data

Question:
What is the recommended approach to correctly interpret dates received from webhooks and query data using the appropriate date?

Any insights would be greatly appreciated!

Best Answer
0 Votes
0 REPLIES 0