You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Currently, sleep sessions and sleep stages are returned in UTC strings without timezone information:
// Example SleepStage object{"stage": 4,"endTime": "2024-11-08T11:24:00Z","startTime": "2024-11-08T11:05:00Z"}
Timezone information is crucial because the user might travel (and thus change timezones) frequently. Without timezone offset information, records before the timezone change will always be interpreted in the device's current timezone (i.e. after the user has travelled), leading to inaccurate reporting. Things also get tricky with daylight savings if timezone offset isn't accounted for.
To Reproduce
Steps to reproduce the behavior:
Use the readRecords() function, especially for SleepSession.
startTime and endTime is returned in UTC strings without timezone offset information
Expected behavior
Include ZoneOffset object, similar to startZoneOffset and endZoneOffset available in ExerciseSessionRecord
Thank you so much for developing this package 🙏
Describe the bug
Currently, sleep sessions and sleep stages are returned in UTC strings without timezone information:
Timezone information is crucial because the user might travel (and thus change timezones) frequently. Without timezone offset information, records before the timezone change will always be interpreted in the device's current timezone (i.e. after the user has travelled), leading to inaccurate reporting. Things also get tricky with daylight savings if timezone offset isn't accounted for.
To Reproduce
Steps to reproduce the behavior:
readRecords()
function, especially for SleepSession.startTime
andendTime
is returned in UTC strings without timezone offset informationExpected behavior
Include
ZoneOffset
object, similar tostartZoneOffset
andendZoneOffset
available in ExerciseSessionRecordEnvironment:
The text was updated successfully, but these errors were encountered: