Repository navigation
Add the device time zone to Huawei sleep records - #453
Open
yatharthranjan wants to merge 1 commit into
Open
yatharthranjan wants to merge 1 commit into
yatharthranjan wants to merge 1 commit into
Conversation
Huawei sends a timeZone offset with each health.record.sleep record. Without it, sleep times are only known in UTC and bedtimes cannot be converted to the user's local time. Add it as an optional field, as HuaweiActivityRecord already has.
yatharthranjan
force-pushed
the
huawei-sleep-time-zone
branch
from
December 1, 2026 16:07
1e7dc6f to
069b056
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an optional
timeZonefield toHuaweiHealthRecordSleep.Huawei Health Kit sends a
timeZoneUTC offset (for example+0000) with everyhealth.record.sleeprecord; this was checked against the live API. The schema had no field for it, so the RADAR Huawei connector dropped it and sleep times could only be read in UTC.HuaweiActivityRecordalready carries the same field.continuous.sleep.fragmentsample points do not carry a time zone, so their local times can be derived from the sleep record of the same night.The field is nullable with a
nulldefault, so the change is backward compatible.This is stacked on #451, which also changes this schema, to avoid conflicts. GitHub will retarget it to
devonce #451 is merged. The connector mapping follows in RADAR-base/RADAR-REST-Connector#204 after a release that includes both PRs.