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
ShortTimePattern does not respect the system configuration when in macOS #61148
Regardless of the used Culture (InstalledUICulture,CurrentCulture,InvariantCulture,CurrentUICulture) the ShortTimePattern is always HH:mm. This is happening only when I run the code in macOS. When running the same code in windows the ShortTimePattern is respecting the system configurations.
You can see an example here. I built a sample project just to show the behavior.
As you can see when running this in windows, the hour format is ok:
@afvieira thanks for the report. This is a limitation we currently have in .NET. This is something we are going to look at to support in the future releases. The workaround for that is manually read the setting from MacOS and use it for your formatting.
@afvieira thanks for the report. This is a limitation we currently have in .NET. This is something we are going to look at to support in the future releases. The workaround for that is manually read the setting from MacOS and use it for your formatting.
Hi @tarekgh, thank you for your quick reply. Can you point me an example to read those settings from macOS?
Thanks in advance
@afvieira here is a hacky example you may try. I couldn't find better way for now but when we get into this issue, we should provide a better way to read it. For now, you may try this example. Note, I didn't do much testing it, so make sure you test and polish it well before using it in any product.
Activity
tarekgh commentedon Nov 3, 2021
@afvieira thanks for the report. This is a limitation we currently have in .NET. This is something we are going to look at to support in the future releases. The workaround for that is manually read the setting from MacOS and use it for your formatting.
afvieira commentedon Nov 3, 2021
Hi @tarekgh, thank you for your quick reply. Can you point me an example to read those settings from macOS?
Thanks in advance
tarekgh commentedon Nov 5, 2021
@afvieira here is a hacky example you may try. I couldn't find better way for now but when we get into this issue, we should provide a better way to read it. For now, you may try this example.
Note, I didn't do much testing it, so make sure you test and polish it well before using it in any product.
danipen commentedon Jan 17, 2024
The same happens for the date. See discussion #97083. Any progress on this?