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

GetAbbreviationsForTimeZone returns non abbreviation names. #45

Closed
gorilla227 opened this issue Aug 2, 2018 · 7 comments
Closed

GetAbbreviationsForTimeZone returns non abbreviation names. #45

gorilla227 opened this issue Aug 2, 2018 · 7 comments
Labels

Comments

@gorilla227
Copy link

When I call TZNames.GetAbbreviationsForTimeZone("Asia/Seoul", "en-US");, I expected the abbreviation name like "KST". However, I got "South Korea Time"(Generic), "South Korea Standard Time"(Standard) and "South Korea Daylight Time"(Daylight).

@mattjohnsonpint
Copy link
Owner

Yeah, abbreviations are a pain unfortunately. For various reasons, I am considering dropping them altogether. How important are they to you?

@gorilla227
Copy link
Author

I'm so sad to hear about that. I think I might need figure out another way to deal with it.
Thanks any way.

@miroslavgrozdanovski
Copy link

@mj1856 , do you have any other recommended way in mind to get the timezone abbreviations?

So far we've used your library in combination with TimeZoneInfo.IsDaylightSavingTime, which is needed to decide which abbreviation to use from those that your library provides. But after some analysis, this library provides abbreviations for only 55 out of the 140 Windows timezones. I'm searching for alternatives, but most of the answers point me back to your library :)

We can make a change and start using IANA timezones, but I don't see a difference when abbreviations are concerned.

Thanks!

@mattjohnsonpint
Copy link
Owner

Unfortunately, no. In general, the concept of a time zone abbreviation is a Western convention, and most are English. They aren't standardized, and there are lots of ambiguities and conflicts. The assumption that all time zones must have an abbreviation is one of those things that English speaking developers have imposed upon the world. It's simply not the reality.

IANA has been correcting this by replacing a lot of the "invented" abbreviations with numbers.

Unicode (CLDR/ICU) has simply never imported most abbreviations. They have just some of the common North American and European ones in English and a few in French. Not much other than that.

I recommend working them out of your system if possible, or only using them where they are widely understood and the context is limited to a single country.

For example, if you are targeting the US, you could use "CST" for Central Standard Time. But if your audience is global then that might get misinterpreted as China Standard Time or Cuba Standard Time. So better to avoid them.

@Carmageddon
Copy link

Carmageddon commented Jul 16, 2021

@mattjohnsonpint I don't quite understand why not add the widely accepted conventions in non-western countries?
For example Omsk Standard Time that the library returns, seems to be quite well known and shows as OMST:
https://www.timeanddate.com/time/zones/omst

I can understand wanting to avoid ambiguity, but at least for English locale, why not have all known abbreviations available?
A precise list of what is available could be helpful too..

@mattjohnsonpint
Copy link
Owner

Closing. Will track abbreviations issue in #91. Thanks.

@mattjohnsonpint mattjohnsonpint closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2023
@mattjohnsonpint
Copy link
Owner

Regarding OMST - that's not in TZDB or CLDR. So again, we need better source data.

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

No branches or pull requests

4 participants