-
-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICU-13845 Windows timezone detection: When DST is off, map to an Etc/GMT+-hh zone #1362
ICU-13845 Windows timezone detection: When DST is off, map to an Etc/GMT+-hh zone #1362
Conversation
e267cb5
to
9038f73
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Here's the output from testing locally (using the With the system set to With DST setting enabled:
With DST setting disabled (no DST):
The diff between the above outputs:
So when the DST setting is turned off (or unchecked) then we get |
…GMT+-hh zone. The Windows 'Date and Time' Control Panel has a setting for "Automatically adjust clock for DST". When this setting is manually unchecked, the DST setting is considered OFF, and the clock does not adjust for DST. This change detects when the setting is OFF and uses the non-DST offset to map to an Etc/GMT+-hh zone. - Also refactor uprv_detectWindowsTimeZone Co-authored-by: Jungshik Shin <jshin@chromium.org>
9038f73
to
ef631f2
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Testing with the time zone set to one that has no offset/bias from GMT/UTC:
It now uses the canonical zone |
PTAL. (I'll need another review due to the force-push). |
The landing cause this issue https://unicode-org.atlassian.net/browse/ICU-21336 break chrome |
Sorry for causing this issue, and thanks for catching this. I missed this when reviewing the changes. (I wonder why the warnings-as-error build bots didn’t catch this though…?) The variable I think the fix would be to either use |
We got Window only timezone bug and I am suspect that is rooted from here. We need someway to unit test this change |
Thanks Frank, I was able to reproduce the issue and I've created a PR #1465 with a fix. |
@jungshik: This PR is a continuation of PR #1297.
I created a new PR for this in order to get the change into ICU 68 by the code freeze. :)
Description from the previous PR and the bug:
The Windows 'Date and Time' Control Panel has a setting for "Automatically adjust clock for DST".
When this setting is manually unchecked, the DST setting is considered OFF, and the clock does not adjust for DST.
However, ICU currently doesn't detect this setting and will continue to use the time zone ID which has DST enabled.
In order to handle this situation, this change detects when the DST setting is OFF and uses the non-DST offset to map to an Etc/GMT+-hh zone.
This change also refactors the code in
uprv_detectWindowsTimeZone
somewhat as well.Note: Much of this change was originally authored by @jungshik -- so marking this commit as:
Co-authored-by: Jungshik Shin.
Checklist