Closed gooderic1977 closed 6 years ago
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"
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