You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enable Globalization to read the user setting overrides for current cultures when using ICU #37121
The DateTimeFormatInfo properties in Net Core 5 Preview 4 return different culture-specific information about the format of date and time values compared to .Net Framework in the same environment
Our unit tests detected this issue immediately. (we maintain unit tests for all the released and preview environments like .net core 5 in our codebase). Thus it is an important breaking change for us.
Configuration
OS Version: Microsoft Windows [Version 10.0.18362.535]
.Net Framework Version: Microsoft (R) .NET CLR Version Tool Version 4.8.3928.0
.Net Core Version: SDK Version: 5.0.100-preview.4.20258.7
Regression?
Yes, this works correctly until .Net Core 5 Preview 4
Other information
Here are some tests which fail under .Net Core 5 Preview 4
@stephentoub is right. We are now using ICU by default. the doc link that @stephentoub mentioned has the way how to switch back using NLS instead of ICU to revert back to the old behavior. Please send any questions you have and we'll be happy to help with.
I clearly understand the reason - using ICU instead of NLS.
The single point I can't understand is "Why the results have taken via ICU does not match OS settings for current culture?".
Should I always switch back to NLS to create desktop applications that take OS settings into account?
@DmitryGaravsky that is a good point. we may try to look at this one and figure out if it make-sense using the overrides from the System. I am not expecting users to switch back to NLS just to pick the overrides.
changed the title [-]The DateTimeFormatInfo properties return different value since .Net Core5 Preview 4 in the same environment[/-][+]Enable Globalization to read the user settings overrides for current cultures when using ICU[/+]on May 28, 2020
changed the title [-]Enable Globalization to read the user settings overrides for current cultures when using ICU[/-][+]Enable Globalization to read the user setting overrides for current cultures when using ICU[/+]on May 28, 2020
@iSazonov I forgot to let you know as we were having trouble to update the SDK to a new runtime, but the latest daily SDK should contain this fix if you want to try it 😄
Activity
stephentoub commentedon May 28, 2020
I expect this is by-design and due to switching to using ICU instead of NLS by default for globalization.
https://github.com/safern/runtime/blob/c592559b25de2bcc2ddf8adcb94a9a37fe1d10ce/docs/design/features/globalization-icu.md
cc: @safern, @tarekgh
tarekgh commentedon May 28, 2020
@stephentoub is right. We are now using ICU by default. the doc link that @stephentoub mentioned has the way how to switch back using NLS instead of ICU to revert back to the old behavior. Please send any questions you have and we'll be happy to help with.
DmitryGaravsky commentedon May 28, 2020
Thanks, @stephentoub and @tarekgh
I clearly understand the reason - using ICU instead of NLS.
The single point I can't understand is "Why the results have taken via ICU does not match OS settings for current culture?".
Should I always switch back to NLS to create desktop applications that take OS settings into account?
safern commentedon May 28, 2020
@Dmitri-Botcharnikov maybe you're hitting this issue: #35638 ?
This was fixed for Preview5. Could you try with our latest release and see if that works as expected?
You can get the latest daily build from here: https://github.com/dotnet/installer/blob/master/README.md#installers-and-binaries
tarekgh commentedon May 28, 2020
@DmitryGaravsky that is a good point. we may try to look at this one and figure out if it make-sense using the overrides from the System. I am not expecting users to switch back to NLS just to pick the overrides.
[-]The DateTimeFormatInfo properties return different value since .Net Core5 Preview 4 in the same environment[/-][+]Enable Globalization to read the user settings overrides for current cultures when using ICU[/+][-]Enable Globalization to read the user settings overrides for current cultures when using ICU[/-][+]Enable Globalization to read the user setting overrides for current cultures when using ICU[/+]tarekgh commentedon May 28, 2020
@DmitryGaravsky I have changed the title of the issue just to reflect what needs to be fixed.
safern commentedon May 28, 2020
Thanks @tarekgh I've self assigned to start looking into it.
DmitryGaravsky commentedon May 28, 2020
Thanks, guys! I'll stay tuned
iSazonov commentedon Jul 3, 2020
What .Net preview version is we get the fix in?
safern commentedon Jul 3, 2020
This is going to land on Preview8. I can’t point you to the first daily build that contains the fix for Powershell to try it out.
safern commentedon Jul 16, 2020
@iSazonov I forgot to let you know as we were having trouble to update the SDK to a new runtime, but the latest daily SDK should contain this fix if you want to try it 😄
https://aka.ms/dotnet/net5/dev/Sdk/dotnet-sdk-win-x64.exe
https://github.com/dotnet/installer/blob/master/README.md#installers-and-binaries