Skip to content

Bugfix: DatePicker DST Offset Handling#466

Open
fhasse95 wants to merge 1 commit into
skiptools:mainfrom
fhasse95:Date-Picker-DST-Offset-Bugfix
Open

Bugfix: DatePicker DST Offset Handling#466
fhasse95 wants to merge 1 commit into
skiptools:mainfrom
fhasse95:Date-Picker-DST-Offset-Bugfix

Conversation

@fhasse95

Copy link
Copy Markdown
Contributor

While testing the DatePicker, I noticed that the selected date could shift during Daylight Saving Time (DST) transitions, resulting in an incorrect date being returned. The reason for this issue is that time zone offsets were applied manually when converting between date values and the millisecond representation used by the Android DatePicker.

To reproduce the issue, you can use the DatePickerPlayground in Skip Showcase. For example, in Germany, selecting dates around the DST transition results in the previous day being returned:

DatePickerPlayground

As shown in the screenshot, selecting March 30th still returns the correct value. However, selecting March 29th returns March 28th instead. The same one-day shift can also be observed for earlier dates, such as March 28th and March 27th, indicating that the timezone offset calculation causes dates before the DST transition to be shifted back by one day.

This PR removes the manual offset adjustment and uses direct timestamp conversion instead, ensuring that the selected date is preserved correctly regardless of DST or timezone offsets.


Thank you for contributing to the Skip project! Please review the contribution guide at https://skip.dev/docs/contributing/ for advice and guidance on making high-quality PRs.

Use this space to describe your change and add any labels (bug, enhancement, documentation, etc.) to help categorize your contribution.

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device
  • REQUIRED: I have checked whether this change requires a corresponding update in the Skip Fuse UI repository (link related PR if applicable)
  • OPTIONAL: I have added an example of any UI changes to the Showcase sample app

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

Codex was used to investigate and implement the fix for the DST-related DatePicker issue. After reviewing the proposed changes, I manually verified the fix by testing date selection across different dates and DST boundaries on Android.


@cla-bot cla-bot Bot added the cla-signed label Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant