Skip to content

fix offset reference#954

Open
shounbi wants to merge 2 commits into
android:mainfrom
shounbi:health-connect-timezone
Open

fix offset reference#954
shounbi wants to merge 2 commits into
android:mainfrom
shounbi:health-connect-timezone

Conversation

@shounbi

@shounbi shounbi commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Update zoneOffset reference

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates writeSleepSessionWithStage and writeSleepSessionWithoutStage in HealthConnectManager.kt to dynamically calculate and use the system's local zone offset instead of hardcoding UTC. However, the reviewer pointed out that in both functions, the constructed SleepSessionRecord is never actually written to the healthConnectClient or returned, making the operations ineffective. To resolve this, the functions should be marked as suspend and the records should be saved using healthConnectClient.insertRecords().

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

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.

2 participants