-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[Android][Net6/7] TimeZoneInfo StandardName/DaylightName does not displays abbreviations anymore #85126
Comments
Tagging subscribers to this area: @dotnet/area-system-datetime Issue DetailsDescriptionSince Reproduction StepsI've made a small uno project containing both a Xamarin version & net6/7 version that checks all
Alternatively, you could simply add those logs on any net6/7 or xamarin app var timeZones = TimeZoneInfo.GetSystemTimeZones();
foreach (var tz in timeZones)
{
Console.WriteLine($"timezone {tz}= StandardName: {tz.StandardName}, DaylightName: {tz.DaylightName}");
} Expected behaviorConsole logs are in this file. Github won't let met put the whole thing. Result on the android xamarin sample app provided above Actual behaviorWith the loggin in the expected section, I have this on my android net6/7 project
I had this on my net6/7 android sample provided above Regression?I'm not 100% sure the specific .NET version, but on xamarin it's not an issue. Known WorkaroundsN/A Configuration
Other informationOn
|
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsDescriptionSince Reproduction StepsI've made a small uno project containing both a Xamarin version & net6/7 version that checks all
Alternatively, you could simply add those logs on any net6/7 or xamarin app var timeZones = TimeZoneInfo.GetSystemTimeZones();
foreach (var tz in timeZones)
{
Console.WriteLine($"timezone {tz}= StandardName: {tz.StandardName}, DaylightName: {tz.DaylightName}");
} Expected behaviorConsole logs: logs_expected.txt Result on the android xamarin sample app provided above Actual behaviorWith the loggin in the expected section, I have this on my android net6/7 project logs_actual.txt I had this on my net6/7 android sample provided above Regression?I'm not 100% sure the specific .NET version, but on xamarin it's not an issue. Known WorkaroundsN/A Configuration
Other informationOn
|
/cc @mdh1418 |
Any news on it @steveisok @mdh1418 ? |
Nothing yet, but it is on @mdh1418's list to investigate. |
Hi @takla21, I believe the change in behavior is expected. The .NET 6 effort included a unification that affected the base class libraries, so now the Android implementation follows .NET libraries implementation in lieu of the mono/mono BCL implementation that is seen in Classic Xamarin.Android. I believe you might be able to see the abbreviations for the Is there a particular reason you need to have abbreviations for these properties? As the documentation (showing the specific .NET 6 docs) for |
Hi @mdh1418, so essentially, we need to display the timezone on our app. In our case, it's easier to fit the abbreviation rather than its full name. Fortunately, we've worked around it by using another library, https://www.nuget.org/packages/TimeZoneNames, to get the abbreviation. So, if you're saying that it's supposed to behave that way on net6, I guess we can close it. Although, if I recall correctly, on iOS, it still displays the timezone as abbreviated. Does this mean that there should be a bug on iOS instead? |
It might indeed be a bug on iOS as we use our own version of ICU to grab information, so the appropriate data to get the full name for StandardName and DaylightName might have been filtered out. I'll have to investigate that. Thanks for pointing it out! |
Closing this issue as it is the current expected behavior for Android, will create an iOS issue after confirming the bug. |
Description
Since
net6.0-android
,StandardName
&DaylightName
does not return abbreviations. Instead it returns the full name.Reproduction Steps
I've made a small uno project containing both a Xamarin version & net6/7 version that checks all
TimeZoneInfo
and displayTimeZoneInfo.Local
info to the page.Alternatively, you could simply add those logs on any net6/7 or xamarin app
Expected behavior
Console logs: logs_expected.txt
Here's the result on my android xamarin sample app provided above
Actual behavior
With the loggin in the expected section, I have this on my android net6/7 project logs_actual.txt
Here's the result on my net6/7 android sample provided above
Regression?
I'm not 100% sure the specific .NET version, but on xamarin it's not an issue.
Known Workarounds
N/A
Configuration
net6.0-android
,net7.0-android
Other information
On
net6.0-ios
, it's still displaying abbreviations forStandardName
&DaylightName
.The text was updated successfully, but these errors were encountered: