Repository navigation
Cherry-pick: Fix Windows TZ offset when Automatic DST setting is OFF - #65
Merged
Merged
Conversation
This change cherry-picks the upstream fix for the issue of the Windows Time Zone offset being wrong when Automatic DST setting is OFF in the Control Panel. ICU-21465 Windows Time Zone offset is wrong when Automatic DST setting is OFF https://unicode-org.atlassian.net/browse/ICU-21465 Cherry-picked from upstream commit: c6934ff7476200fc22abdf4300c94e2a3460c793 The upstream PR into master is here: unicode-org/icu#1465 The upstream PR into maint/maint-68 is here: unicode-org/icu#1543
Erin Genovy (jefgen)
requested review from
a team,
Axel Andrejs (axelandrejs) and
Daniel Ju (daniel-ju-msft)
January 28, 2021 02:36
Daniel Ju (daniel-ju-msft)
approved these changes
Jan 28, 2021
Erik Torres (erik0686)
approved these changes
Jan 28, 2021
This was referenced Feb 1, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change cherry-picks the upstream fix for the issue of the Windows Time Zone offset being wrong when Automatic DST setting is OFF in the Control Panel.
Upstream ticket:
ICU-21465 Windows Time Zone offset is wrong when Automatic DST setting is OFF
https://unicode-org.atlassian.net/browse/ICU-21465
Upstream PR into
masteris here: unicode-org/icu#1539Upstream PR into
maint/maint-68is here: unicode-org/icu#1543Summary
PR Checklist
Detailed Description
From the upstream PR description:
This fixes a bug in the changes for ICU-13845, for handling when the "Automatic DST" setting is OFF in the Control Panel.
It turns out that the offset value for the calculated time zone when the "Automatic DST" setting is turn off is wrong. The sign for the time zone offset is flipped. (It's positive when it should be negative, and vice-versa).
I think this was perhaps due to confusion about the value for the UTC offset, how POSIX style offsets are handled, and what is reported by the Win32 API
GetDynamicTimeZoneInformation. It seems that this issue was actually present in the original PR for ICU-13845 and it was missed in the reviews on the other PR for the ticket.I also missed this when I was manually testing out the changes, as I was expecting the wrong values for the offset to be reported. (For example,
Etc/GMT-8instead ofEtc/GMT+8).Note: The actual change here is only one character. The rest are comments that I added in order to help explain things for others in the future.
Testing:
I created a document that has different manual test cases that exercise various scenarios for most of the code paths for the Windows TZ mapping in ICU. (I also added notes on what the various test cases are exercising in the code.)
Link: https://docs.google.com/document/d/17Y_Ns4EBV8wnHioJNFc-dJCRRpJ3hpJZDYmTq6ekIsM
(The test case 7 in the document reproduces the issue that this PR fixes).