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

BCL standard name for AUS Eastern Standard Time #42

Closed
gooderic1977 opened this issue Apr 19, 2018 · 1 comment
Closed

BCL standard name for AUS Eastern Standard Time #42

gooderic1977 opened this issue Apr 19, 2018 · 1 comment

Comments

@gooderic1977
Copy link

I was expecting TZNames.GetNamesForTimeZone return a result contain a valid BCL standard timezone name, e.g.:

TZNames.GetNamesForTimeZone("Australia/Sydney","en-US").Standard -> AUS Eastern Standard Time

However, I got a result: "Australia Eastern Standard Time" instead. This is not a valid standard timezone name

@mattjohnsonpint
Copy link
Owner

mattjohnsonpint commented Apr 20, 2018

I think you are confusing names for identifiers. TimeZoneNames produces human-readable localizable names, for display to end users. If you just want conversion to Microsoft (BCL) standard time zone identifiers, use TimeZoneConverter instead.

I maintain both libraries, and TimeZoneNames takes a dependency on TimeZoneConverter, so you probably already have it.

string tz = TZConvert.IanaToWindows("Australia/Sydney"); //=> "AUS Eastern Standard Time"

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

No branches or pull requests

2 participants