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

Feature request - unique display names on Windows #73

Open
Ansssss opened this issue Feb 22, 2022 · 0 comments
Open

Feature request - unique display names on Windows #73

Ansssss opened this issue Feb 22, 2022 · 0 comments

Comments

@Ansssss
Copy link

Ansssss commented Feb 22, 2022

dotnet/runtime#48931 - in this you added the ability to get unique display names on Unix.
For example:

Id Display Name
America/Anchorage (UTC-09:00) Alaska Time (Anchorage)
America/Juneau (UTC-09:00) Alaska Time (Juneau)

But the TZNames.GetDisplayNameForTimeZone method does not provide such unique names

using System;
using TimeZoneNames;
namespace ConsoleApp1
{
    class Program
    {
        static void Main()
        {
            string ianaId1 = "America/Anchorage";
            string ianaId2 = "America/Juneau";
            Console.WriteLine($"IANA Id={ianaId1}\t\tDisplay Name={TZNames.GetDisplayNameForTimeZone(ianaId1, "en-US")}");
            Console.WriteLine($"IANA Id={ianaId2}\t\tDisplay Name={TZNames.GetDisplayNameForTimeZone(ianaId2, "en-US")}");
           /*prints:
            IANA Id=America/Anchorage               Display Name=(UTC-09:00) Alaska
            IANA Id=America/Juneau          Display Name=(UTC-09:00) Alaska
           */
        }
    }
}

This issue is to request the capability to get those unique display names on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants