mattjohnsonpint / TimeZoneNames

Provides a complete source of localized time zone names and abbreviations.
MIT License
199 stars 32 forks source link

Some inconsistency under Linux #61

Closed xlegalles closed 3 years ago

xlegalles commented 3 years ago

Reproducible steps This code works fine under Windows 10 (.NET Core 2.2) but not under Ubuntu: var can = TZConvert.TryGetTimeZoneInfo("Europe/Paris", out var timeZone); if (can) { Console.WriteLine($"TZ Europe/Paris into IANA {TZConvert.WindowsToIana(timeZone.Id)}"); } Current result Unhandled Exception: System.InvalidTimeZoneException: "Europe/Paris" was not recognized as a valid Windows time zone ID. at TimeZoneConverter.TZConvert.WindowsToIana(String windowsTimeZoneId, String territoryCode)

Any idea?

mattjohnsonpint commented 3 years ago

Dup of mj1856/TimeZoneConverter#78