-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix TimeZoneInfo.HasIanaId when using Local Time Zone #58392
Conversation
Tagging subscribers to this area: @tarekgh, @safern Issue DetailsWe have exposed the new property
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes LGTM.
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1184414702 |
@tarekgh backporting to release/6.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix TimeZoneInfo.HasIanaId when using Local Time Zone
Applying: Add more test
error: sha1 information is lacking or useless (src/libraries/System.Runtime/tests/System/TimeZoneInfoTests.cs).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Add more test
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
#58326
We have exposed the new property
TimeZoneInfo.HasIanaId
in .NET 6.0. This property tells if the Time Zone object is created with IANA Id. This property returns the correct results except when usingTimeZoneInfo.Local
. The reason is when we initialize TimeZoneInfo.Local property we clone the object before returning it, but we missed cloningHasIanaId
property inside the returned object. The fix is to ensureHasIanaId
is initialized correctly inTimeZoneInfo.Local
.