0

I am working with the Google Fit API and have managed to figure out how to get sleep sessions and sleep detail. However all the times are in milliseconds since the epoch. How can I find out what the user's local time was when they woke up or their timezone at that time?

Without this information I can't attribute the sleep to the correct calendar day.

David Tinker
  • 9,383
  • 9
  • 66
  • 98
  • It's seems not possible to configure the timezone or get timezone on a Google Fit. If you need your date logic to format dates for a specific timezone, you should be using a library that knows how to do this. – Arel Guatno Jun 23 '22 at 14:57
  • For sleep the timezone needs to be recorded with the data. Otherwise you can't compute the calendar day when the user woke up. – David Tinker Jun 24 '22 at 15:30

0 Answers0