Skip to content
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

[libs][iOS] TimeZoneInfo StandardName/DisplayName display abbreviations instead of full name #89466

Closed
mdh1418 opened this issue Jul 25, 2023 · 5 comments
Assignees
Milestone

Comments

@mdh1418
Copy link
Member

mdh1418 commented Jul 25, 2023

Description

As mentioned in #85126 (comment), StandardName and DisplayName return abbreviations instead of the full name that other platforms return. This is likely due to iOS using its own version of ICU, and the data there not being complete enough to return the full name. As a result, it is likely that the backup values

string? standardDisplayName = _standardAbbrevName;
and
string? daylightDisplayName = _daylightAbbrevName ?? _standardAbbrevName;
are being used instead.

Reproduction Steps

Run the iOS sample src/mono/sample/iOS with

Console.WriteLine("StandardName: {TimeZoneInfo.Local.StandardName}");
Console.WriteLine("DaylightName: {TimeZoneInfo.Local.DaylightName}");

Expected behavior

Should see full names and not abbreviations, and since I'm based on East coast of North America,
Eastern Standard Time
Easter Daylight Time

Actual behavior

I'm based on East coast of North America, so
EST
EDT

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 25, 2023
@ghost
Copy link

ghost commented Jul 25, 2023

Tagging subscribers to this area: @dotnet/area-system-datetime
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

As mentioned in #85126 (comment), StandardName and DisplayName return abbreviations instead of the full name that other platforms return. This is likely due to iOS using its own version of ICU, and the data there not being complete enough to return the full name. As a result, it is likely that the backup values

string? standardDisplayName = _standardAbbrevName;
and
string? daylightDisplayName = _daylightAbbrevName ?? _standardAbbrevName;
are being used instead.

Reproduction Steps

Run the iOS sample src/mono/sample/iOS with

Console.WriteLine("StandardName: {TimeZoneInfo.Local.StandardName}");
Console.WriteLine("DaylightName: {TimeZoneInfo.Local.DaylightName}");

Expected behavior

Should see full names and not abbreviations, and since I'm based on East coast of North America,
Eastern Standard Time
Easter Daylight Time

Actual behavior

I'm based on East coast of North America, so
EST
EDT

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Author: mdh1418
Assignees: -
Labels:

area-System.DateTime

Milestone: -

@tarekgh tarekgh added the os-ios Apple iOS label Jul 25, 2023
@ghost
Copy link

ghost commented Jul 25, 2023

Tagging subscribers to 'os-ios': @steveisok, @akoeplinger, @kotlarmilos
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

As mentioned in #85126 (comment), StandardName and DisplayName return abbreviations instead of the full name that other platforms return. This is likely due to iOS using its own version of ICU, and the data there not being complete enough to return the full name. As a result, it is likely that the backup values

string? standardDisplayName = _standardAbbrevName;
and
string? daylightDisplayName = _daylightAbbrevName ?? _standardAbbrevName;
are being used instead.

Reproduction Steps

Run the iOS sample src/mono/sample/iOS with

Console.WriteLine("StandardName: {TimeZoneInfo.Local.StandardName}");
Console.WriteLine("DaylightName: {TimeZoneInfo.Local.DaylightName}");

Expected behavior

Should see full names and not abbreviations, and since I'm based on East coast of North America,
Eastern Standard Time
Easter Daylight Time

Actual behavior

I'm based on East coast of North America, so
EST
EDT

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Author: mdh1418
Assignees: -
Labels:

untriaged, os-ios, area-System.DateTime

Milestone: -

@tarekgh
Copy link
Member

tarekgh commented Jul 25, 2023

@steveisok could you please triage as it is iOS?

@steveisok steveisok removed the untriaged New issue has not been triaged by the area owner label Jul 25, 2023
@steveisok steveisok added this to the 8.0.0 milestone Jul 25, 2023
@steveisok
Copy link
Member

I think this is something we can tweak in the ICU filter for iOS.

@mdh1418
Copy link
Member Author

mdh1418 commented Sep 7, 2023

After Meri's work in #91458, the DisplayName/StandardName/DaylightName TimeZoneInfo properties are no longer abbreviations when HybridGlobalization is enabled. When HybridGlobalization is not enabled, default values (abbreviated form) will be used similar to Invariant globalization mode.

@mdh1418 mdh1418 closed this as completed Sep 7, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants