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):
Case 2 (Working correctly):
Environment:
Observed:
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
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Hi @h-irie
The notification date tells you when the sleep record has been added, updated or deleted. Unfortunately, we do not state in the notification which action occurred. If the user deleted a sleep record on July 8th, that would make sense for case 1.
Gordon
Best Answer