MenoData / Time4J

Advanced date, time and interval library for Java with sun/moon-astronomy and calendars like Chinese, Coptic, Ethiopian, French Republican, Hebrew, Hijri, Historic Christian, Indian National, Japanese, Julian, Korean, Minguo, Persian, Thai, Vietnamese
GNU Lesser General Public License v2.1
424 stars 62 forks source link

TZID DisplayName Error (Korean Standard Time > Korea Standard Time) #971

Closed safesoft-ysh closed 1 year ago

safesoft-ysh commented 1 year ago

Below a code's result is 'Korean Standard Time'.

import net.time4j.tz.NameStyle;
import net.time4j.tz.TZID;
import net.time4j.tz.Timezone;

...

String winzone = "WINDOWS~Asia/Seoul";
NameStyle dummy = NameStyle.LONG_STANDARD_TIME; // does not really matter
String result = Timezone.of(winzone).getDisplayName(dummy, Locale.US);
System.out.println(result);

But, correct name of KST is 'Korea Standard Time'. Please the check. Thank you

MenoData commented 1 year ago

Thank you for your contribution and sorry for late reply. The name/description of Korean time zone originates from Java standard code using the classjava.text.DateFormatSymbols. And this class fetches the text in question finally from unicode cldr repository. The actual content related to Korea can be found in:

meta-zone-entry Korea

And yes, it yields the text "Korean Standard Time". We can certainly discuss why not "Korea Standard Time", but this discussion is out of scope of Time4J since this library is just a consumer of JDK-entries in this detail. Maybe you should send a request to the cldr group instead.