Skip to content

fix: skip native Date fast paths when local timezone is overridden (#9669)#9680

Closed
sonsu-lee wants to merge 1 commit intoadobe:mainfrom
sonsu-lee:fix/set-local-timezone-fast-path
Closed

fix: skip native Date fast paths when local timezone is overridden (#9669)#9680
sonsu-lee wants to merge 1 commit intoadobe:mainfrom
sonsu-lee:fix/set-local-timezone-fast-path

Conversation

@sonsu-lee
Copy link
Contributor

Closes #9669

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

yarn jest packages/@internationalized/date/tests/

🧢 Your Project:

  • Personal

…dobe#9669)

`setLocalTimeZone` overrides the cached timezone string, but fast paths
in `getTimeZoneOffset` and `toAbsolute` delegate to native `Date` which
always uses the browser's real timezone. This causes incorrect offsets
when the overridden timezone differs from the real one.

Skip the fast paths when `setLocalTimeZone` has been called and not reset.
@sonsu-lee
Copy link
Contributor Author

Closing in favor of #9678

@sonsu-lee sonsu-lee closed this Feb 20, 2026
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.

setLocalTimeZone if used and different from the browser time zone, causes date time conversion to be incorrect when converting the local timezone

1 participant

Comments