Skip to content

Feature request - unique display names on Windows #73

@Ansssss

Description

@Ansssss

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions