mattjohnsonpint / TimeZoneNames

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

"Yukon Standard Time" not recognized as a valid IANA time zone name, or has no equivalent Windows time zone. #60

Closed theonlychunsta closed 3 years ago

theonlychunsta commented 3 years ago

image

A new timezone has been added by Windows in one of their recent updates, causing this exception to be thrown.

mattjohnsonpint commented 3 years ago

Thanks. I just added this to TimeZoneConverter 3.3.0, but I need to update TimeZoneNames for it as well.

Grandizer commented 3 years ago

Wow. glad I found this. So, when will 3.3.1 be out? :)

Grandizer commented 3 years ago

Also, perhaps as a future enhancement (after this fix goes out) if you could make a TryGetDisplayNameForTimeZone so it won't crash this code I inherited.

mattjohnsonpint commented 3 years ago

I'll have an update for TimeZoneNames out soon. I'm working on it. The Windows display names have to be re-built via TimeZoneWindowsResourceExtractor first. (It takes some time to get the VM with all the language packs installed and updated before extraction.)

mattjohnsonpint commented 3 years ago

Also, by its current design - GetDisplayNameForTimeZone should have returned null instead of throwing an exception. I'll fix that.

Not planning on adding TryGet* methods to this library, at least not now.

mattjohnsonpint commented 3 years ago

Both are fixed in version 4.1.0. Thanks!

Grandizer commented 3 years ago

Good Job, I will grab it later today. Thank you.