mattjohnsonpint / TimeZoneNames

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

inconsistent names #23

Closed DanAvni closed 7 years ago

DanAvni commented 7 years ago

when asking for us timezones valid today I get TimeZoneNames.TZNames.GetTimeZonesForCountry("us","en",Date.UtcNow) I get two mountain time zones America/Phoenix Mountain Time (Phoenix) America/Denver Mountain Time (Denver)

however when asking for the name of

TimeZoneNames.TZNames.GetNamesForTimeZone("America/Denver","en")
TimeZoneNames.TZNames.GetNamesForTimeZone("America/Phoenix","en")

I get for both a name of "Mountain Time"

is this by design or a bug?

mattjohnsonpint commented 7 years ago

Sorry for the delayed response.

It's by design, in that GetTimeZoneForCountry appends the city name when necessary to disambiguate results. GetNamesForTimeZone simply returns the raw result.