mattjohnsonpint / TimeZoneNames

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

Incorrect Timezone Name #25

Closed vbbalaji closed 6 years ago

vbbalaji commented 7 years ago
tzStr = "Central European Standard Time"
Dim abbr As TimeZoneNames.TimeZoneValues
abbr = TimeZoneNames.TZNames.GetAbbreviationsForTimeZone(tzStr, "en-US")
Dim mAb As String
mAb = abbr.Daylight

In VB.Net, Im getting "Poland Daylight Time" instead of CEST. Am I missing something? Im getting this for both Daylight and Standard. I did check Central European Standard Time is a standard timezone name.

mattjohnsonpint commented 7 years ago

It's not VB, I get the same thing in C#. It has to do with abbreviations not being in CLDR for all time zones, but yes - I should be able to deduce CET / CEST for this one.

mattjohnsonpint commented 6 years ago

FYI - This is still occurring in 3.0.0. It's not a library problem as much as it's a problem with the CLDR source data. Time zone abbreviations are known in CLDR as "short names", and presently the short names are only defined for locales where they are relevant. In this case, CET/CEST are not defined for American English, but only for British English. Indeed, if you pass "en-GB", it will work. Still, I'd like to figure out a way to overcome this in a future release.

mattjohnsonpint commented 6 years ago

Fixed in version 3.2.0. Thanks.