Skip to content

[Android][Net6/7] TimeZoneInfo StandardName/DaylightName does not displays abbreviations anymore #85126

@takla21

Description

@takla21

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 display TimeZoneInfo.Local info to the page.

  • Download this sample TimeZoneSample.zip
  • Open it on visual studio 2022
  • Go to the NET folder
  • Deploy on android (you can also change net version in the csproj)
  • Look for logs in the console

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 behavior

Console logs: logs_expected.txt

Here's the result on my android xamarin sample app provided above
Screenshot_20230420-182805

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
Screenshot_20230420-182813

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
  • Tested on Android 11

Other information

On net6.0-ios, it's still displaying abbreviations for StandardName & DaylightName.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions