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: