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

TZNames.GetAbbreviationsForTimeZone() for 'nb-NO' throws System.Exception: Could not find a language with code nb-NO #75

Open
linusswanbergpolestar opened this issue Mar 15, 2022 · 3 comments
Labels

Comments

@linusswanbergpolestar
Copy link

linusswanbergpolestar commented Mar 15, 2022

Happens for versions 5.0.0 and 5.0.1

Works fine for version 4.2.0

@mattjohnsonpint
Copy link
Owner

Hmmm.. I'll have to investigate further. Thanks.

@mattjohnsonpint
Copy link
Owner

Indeed, this is still happening on 6.0.0.

var results = TimeZoneNames.TZNames.GetNamesForTimeZone("America/Los_Angeles", "nb-NO");
Console.WriteLine(results.Generic);
Unhandled exception. System.Exception: Could not find a language with code nb-NO
   at TimeZoneNames.TZNames.GetLanguageKey(String languageCode, Boolean forDisplayNames)
   at TimeZoneNames.TZNames.GetNamesForTimeZone(String timeZoneId, String languageCode)
   at Program.<Main>$(String[] args) in Program.cs:line 1

@bmrfvr
Copy link

bmrfvr commented Oct 24, 2023

I believe this issue would be fixed by my PR: #104

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

No branches or pull requests

3 participants