Skip to content

Add the device time zone to Huawei sleep records - #453

Open
yatharthranjan wants to merge 1 commit into
huawei-activity-device-typefrom
huawei-sleep-time-zone
Open

yatharthranjan wants to merge 1 commit into
huawei-activity-device-typefrom
huawei-sleep-time-zone

Conversation

@yatharthranjan

@yatharthranjan yatharthranjan commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Adds an optional timeZone field to HuaweiHealthRecordSleep.

Huawei Health Kit sends a timeZone UTC offset (for example +0000) with every health.record.sleep record; 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. HuaweiActivityRecord already carries the same field. continuous.sleep.fragment sample 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 null default, so the change is backward compatible.

This is stacked on #451, which also changes this schema, to avoid conflicts. GitHub will retarget it to dev once #451 is merged. The connector mapping follows in RADAR-base/RADAR-REST-Connector#204 after a release that includes both PRs.

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 yatharthranjan changed the title Add the device time zone to Huawei sleep records and sleep stages Add the device time zone to Huawei sleep records Dec 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant