JDK-8236548 : Localized time zone name inconsistency between English and other locales
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-12-26
  • Updated: 2020-12-07
  • Resolved: 2020-02-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 15
11.0.9-oracleFixed 13.0.6Fixed 15 b10Fixed
Related Reports
CSR :  
Sub Tasks
JDK-8238914 :  
Description
I have 2 concerns about CLDR Timezone translated data

1. Translation inconsistency
   It seems translated materials may not be up to date.
C locale's output said "Hawaii Standard Time"
$ TZ=US/Hawaii LANG=C ~/jdk-14/bin/java tztest.java
2019.12.25 21:08:09 HST Hawaii Standard Time

Japanese output said like "Hawaii-Aleutian Standard Time"
$ TZ=US/Hawaii LANG=ja_JP.UTF-8 ~/jdk-14/bin/java tztest.java
2019.12.25 21:08:15 HST \u30cf\u30ef\u30a4\u30fb\u30a2\u30ea\u30e5\u30fc\u30b7\u30e3\u30f3\u6a19\u6e96\u6642

The contents of English file and the Japanese file are not consistent.
The English file is newer than Japenase translation base file.

Also following timezones may have same kind of issue because only en* locales are not same as the others.
SystemV/YST9: [AKST: 665, GAMT: 108]
Asia/Qostanay: [ALMT: 108, QOST: 665]
Asia/Oral: [AQTT: 108, ORAT: 665]
Asia/Qyzylorda: [AQTT: 108, QYZT: 665]


2. Translated Timezone short name may not be invalid or unexpected

But too many translated Timezone short names are there on CLDR
$ LANG=C ~/jdk-14/bin/java tzdump1.java
Note: tzdump1.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
...
US/Hawaii: [HAST: 11, HST: 758, Honolulunormaltid: 4]
...
$ LANG=C ~/jdk-14/bin/java tzdump2.java US/Hawaii
Note: tzdump2.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
US/Hawaii: HAST(11) [nb_SJ, no, zh_TW, nb_NO, no_NO, zh_MO_#Hant, nb, zh_HK_#Hant, zh__#Hant, zh_TW_#Hant, zh_HK]
US/Hawaii: HST(758) [, nds, ti_ET, ta_SG, lv, en_NU, zh_SG_#Hans, en_JM, kkj, es_BO, dz_BT, dsb_DE, en_LR, ar_TD, cs, el, af, ff_MR_#Latn, sw_UG, smn, tk_TM, sr_ME_#Cyrl, ar_EG, dsb, yo_NG, se_NO, khq, vo_001, en_PW, pl_PL, sr_CS, ne_IN, ji, ar_EH, bs_BA_#Latn, nds_DE, es_US, en_US_POSIX, pt_MO, zh__#Hans, lb_LU, so_KE, dje_NE, ff_GH_#Latn, fr_PM, ar_KM, no_NO_NY, agq_CM, teo, tr_TR, eu, ar_MR, es_DO, ru, az, fa, kl_GL, en_NR, nd, kk, hy, en_AU, en_CY, ti_ER, nus_SS, en_RW, ksb, luo, lb, ln_CD, nnh_CM, ar_IL, mgh, or_IN, az__#Latn, ta, lag, ar_SY, ksf_CM, bo, tt_RU, om_KE, en_AS, fr_VU, kln, pt_MZ, fr_NE, ksb_TZ, en_JE, ln_CF, en_CX, en_AT, gl, sr__#Cyrl, yue_CN_#Hans, kn_IN, ga, qu, en_TZ, en_PR, mua, jv, in, ps, sn, km, zgh, fr_NC, es, gd_GB, jgo, fr_CM, gsw, pa_IN_#Guru, teo_UG, ceb, en_NL, ln_CG, te, sl, el_CY, mr_IN, ha, ku_TR, lrc_IR, gsw_FR, es_HN, hu_HU, ff_SN, sbp, sq_MK, sr_BA_#Cyrl, et_EE, sw, fy_NL, ar_OM, tr_CY, nmg, uz_UZ_#Latn, dua_CM, de_IT, lrc_IQ, vai__#Vaii, fr_TN, sr_RS, de_CH, fr_PF, gu, pt_GQ, vun_TZ, jmc_TZ, en_TV, lo, en_PN, cu_RU, zh_HK_#Hans, nl_NL, en_GY, bs__#Latn, dyo_SN, os, nl_CW, ar_DZ, pt_CH, fr_GQ, am, en_NG, fr_CI, ki_KE, ia_001, en_PK, zh_CN, en_LC, rw, brx_IN, iw, gv_IM, mk_MK, en_TT, dav, sl_SI, ses, xh_ZA, fr_BE, jgo_CM, es_VE, mg, mr, mer_KE, en_BM, seh, kea_CV, mgo, vi_VN, en_US, mfe_MU, fr_BF, pa__#Guru, it_SM, fr_YT, gu_IN, ff_CM_#Latn, ast, fi_FI, yue__#Hans, ca_FR, sr_BA_#Latn, fr_DJ, ha_GH, de_BE, ff_GW_#Latn, cgg, nyn_UG, ms_MY, ta_LK, ksf, cy, ceb_PH, sq, fr, tg_TJ, qu_PE, de, es_EC, lg_UG, ff_NE_#Latn, zu_ZA, cgg_UG, ksh_DE, lg, ru_RU, en_DM, sd, ga_IE, en_BI, en_WS, fr_LU, so, mi_NZ, ar_ER, kab, nus, sn_ZW, prg, iw_IL, es_EA, ga_GB, th_TH_TH_#u-nu-thai, hi, fr_SC, en_SL, ff_NG_#Latn, en_SH, vai, de_LU, mi, mt, de_DE, en_DK, yav, so_DJ, lt_LT, kam, ro, eo_001, ps_PK, ee, en_UM, en_SI, vai_LR_#Vaii, lo_LA, chr, ar_LB, af_ZA, in_ID, es_BZ, ar_AE, hr_HR, as, rof_TZ, it, ks_IN, my_MM, ur_PK, mn_MN, da_DK, en_FM, en_BE, ii, fr_WF, mzn_IR, naq, en_SG, kln_KE, tzm, ff_GM_#Latn, fur, om, bez_TZ, ff_GN_#Latn, en_SD, ja_JP_JP_#u-ca-japanese, es_SV, pt_BR, ml_IN, en_FK, is_IS, en_DG, hr, pt_ST, ak_GH, lt, uz_AF_#Arab, ccp, en_SE, zh_CN_#Hans, es_419, en, guz_KE, gsw_LI, ccp_BD, es_IC, ca, ar_TN, bm_ML, kw_GB, ug_CN, es_BR, khq_ML, en_SB, rw_RW, chr_US, shi_MA_#Tfng, ar_IQ, nyn, mk, en_DE, pa__#Arab, bs, ro_MD, en_FI, fy, th, dav_KE, en_SC, en_UG, en_NZ, dje, es_UY, mas_KE, ru_UA, sg_CF, en_FJ, de_LI, en_BB, smn_FI, hr_BA, de_AT, lu_CD, ar_001, so_SO, lv_LV, ckb, ar_KW, sr_RS_#Cyrl, bem, da, wae, en_LS, ig, en_HK, ce_RU, ka_GE, sw_TZ, fr_RW, mg_MG, cu, os_RU, sr_RS_#Latn, ky_KG, ki, kok, ewo, nn, ar_JO, bg, kea, zu, am_ET, fr_DZ, bo_CN, hsb, qu_EC, en_MS, en_GG, vo, sr_ME, mer, sah, en_ZM, fr_ML, br, ha_NG, ar_SA, fa_AF, sk, os_GE, ml, en_MT, en_GH, en_IL, tzm_MA, ses_ML, lkt_US, vai_LR_#Latn, ji_001, ku, sw_CD, fil_PH, it_VA, es_PH, es_ES, es_CO, bg_BG, en_VC, agq, hsb_DE, en_150, ar_SD, en_KN, ha_NE, ebu, ro_RO, sr_ME_#Latn, es_GT, ff_LR_#Latn, bas_CM, fr_MG, es_CL, mn, kam_KE, fa_IR, en_MO, wo, shi__#Tfng, en_BZ, sq_AL, twq_NE, nmg_CM, az__#Cyrl, en_MP, en_GD, tk, shi__#Latn, en_BW, kab_DZ, kde_TZ, ta_MY, nd_ZW, ne, en_IE, zh_SG, en_KI, om_ET, ja_JP, my, ka, fr_MF, shi, kl, en_SZ, rwk_TZ, zh, es_PE, mgh_MZ, saq, en_GB, kk_KZ, es_PA, ar_PS, bez, fr_MC, kw, vai__#Latn, ksh, ur_IN, ln, gsw_CH, luy_KE, pt, kkj_CM, es_GQ, ar_YE, to, en_SX, ru_KZ, et, ko_KP, nl_SR, rof, en_BS, be, gv, dua, nl_BQ, uz_UZ_#Cyrl, en_KE, guz, mfe, asa_TZ, ja, fr_SN, or, brx, fr_MA, pt_LU, fr_BL, mgo_CM, ko_KR, es_MX, fi, uz, bs__#Cyrl, sr__#Latn, en_SS, bo_IN, rm, en_MG, fr_BI, bn, kn, bn_BD, nnh, en_ZA, fr_FR, en_MH, fr_BJ, sah_RU, ps_AF, ky, mas, bs_BA_#Cyrl, sk_SK, xh, wo_SN, fr_HT, te_IN, nl_SX, lrc, ce, fr_CG, mt_MT, ko, nds_NL, ak, kde, dz, en_VU, ia, to_TO, ff_SL_#Latn, seh_MZ, ii_CN, pa_PK_#Arab, fr_RE, bn_IN, fr_GP, pa, zgh_MA, uk_UA, rn, tg, rwk, hu, fr_CH, en_NF, twq, sr_XK_#Cyrl, bm, ar_SS, en_GU, nl_AW, en_AI, en_CM, xog_UG, cs_CZ, tr, ca_ES, rm_CH, ru_MD, ff_SN_#Latn, en_TO, en_PG, fr_CF, pt_TL, en_ER, sr_BA, es_PY, kok_IN, fr_TG, sr_XK_#Latn, en_PH, ig_NG, fr_GN, prg_001, zh_MO_#Hans, se_FI, ff, en_CK, ar_MA, en_AG, fr_TD, ebu_KE, bem_ZM, xog, ewo_CM, fr_CD, rn_BI, en_NA, ms, ug, ca_IT, lag_TZ, teo_KE, ca_AD, qu_BO, haw_US, vi, fr_CA, sq_XK, dyo, en_KY, it_CH, si_LK, luo_KE, en_AE, it_IT, eo, ar_SO, en_ZW, nn_NO, fr_MU, pl, se_SE, en_TK, mua_CM, ur, uz__#Arab, saq_KE, se, pt_GW, ms_SG, ee_TG, ln_AO, be_BY, yue__#Hant, luy, pt_CV, uk, es_PR, wae_CH, mzn, tt, ru_BY, fo_DK, ee_GH, ar_BH, hi_IN, en_CH, asa, yo_BJ, fo_FO, ast_ES, fr_KM, fr_MQ, es_AR, ff__#Latn, en_MY, sbp_TZ, fil, uz__#Cyrl, yue_HK_#Hant, hy_AM, en_GM, fo, ne_NP, fur_IT, ta_IN, fr_GF, lkt, is, si, pt_AO, en_001, jv_ID, ru_KG, fr_MR, ks, ff_BF_#Latn, as_IN, sw_KE, th_TH, yue, jmc, en_MW, naq_NA, en_IO, ar_QA, en_CC, pt_PT, az_AZ_#Cyrl, ckb_IQ, shi_MA_#Latn, es_CU, ar, en_VI, haw, eu_ES, bas, el_GR, yav_CM, uz__#Latn, sg, da_GL, km_KH, ckb_IR, nl, ca_ES_VALENCIA, es_CR, fr_GA, sr, ar_LY, en_MU, gl_ES, en_IM, az_AZ_#Latn, en_GI, en_CA, gd, fr_SY, so_ET, nl_BE, ar_DJ, cy_GB, en_VG, en_TC, af_NA, vun, en_IN, lu, yo, es_NI, sd_PK, mas_TZ, ti, ms_BN, ccp_IN, br_FR]
US/Hawaii: Honolulunormaltid(4) [sv_SE, sv, sv_FI, sv_AX]

It seems translated materials may not be up to date, but "Honolulunormaltid" is short name
"Honolulunormaltid" was in make/data/cldr/common/main/sv.xml
Comments
Fix request (13u) I'd like to downport it, too, as the change is in both 15 and 11. The patch doesn't require adaptation other than related to context copyright date. CSR requested in JDK-8257501
01-12-2020

Fix request (11u) -- will label after testing completed. I would like to downport this for parity with 11.0.9-oracle. This is fixed by the same change as JDK-8234347. It needed trivial resolves: http://mail.openjdk.java.net/pipermail/jdk-updates-dev/2020-July/003440.html I requrested the CSR.
06-07-2020

Naoto. Thank you for the detailed explanation.
18-02-2020

I haven't checked the locale data for each locale, but I believe they are the expected results. The fallback implementation first looks for the entry in CLDR. If there is an array of tz names for the locale, then use it (and look for parent locale's resources if some of the elements are missing). However, if there is no array for the locale, it will look for COMPAT's resources. Thus there are variants in short names for "US/Hawaii" time zone. For others, such as "Asia/Qostanay", there's no translations in CLDR, thus it uses the COMPAT's names.
18-02-2020

Naoto. I'd like to confirm following output was expected one for this issue ? $ LANG=C ~/jdk-15/bin/java tzdump1a.java US/Hawaii SystemV/YST9 Asia/Qostanay Asia/Oral Asia/Qyzylorda ... US/Hawaii: [GMT-10:00: 97, HAST: 11, HST: 661, Honolulunormaltid: 4] SystemV/YST9: [AKST: 773] Asia/Qostanay: [QOST: 773] Asia/Oral: [ORAT: 773] Asia/Qyzylorda: [QYZT: 773] $ And your fix does not affect to "Translated Timezone short name" issue, right ?
17-02-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/10e939d362fc User: naoto Date: 2020-02-12 16:25:51 +0000
12-02-2020

In fact, this specific US/Hawaii case is not runtime dependent. The English time zone names in the resource bundle are different. Here is the breakdown of the difference. - "US/Hawaii" is canonicalized to "Pacific/Honolulu" zone id. - It belongs to "Hawaii_Aleutian" meta zone. - In CLDR's resources, "Pacific/Honolulu" zone has the following names: <zone type="Pacific/Honolulu"> <short> <generic>HST</generic> <standard>HST</standard> <daylight>HDT</daylight> </short> </zone> - OTOH, "Hawaii_Aleutian" meta zone has the following: <metazone type="Hawaii_Aleutian"> <long> <generic>Hawaii-Aleutian Time</generic> <standard>Hawaii-Aleutian Standard Time</standard> <daylight>Hawaii-Aleutian Daylight Time</daylight> </long> <short> <generic>HAT</generic> <standard>HAST</standard> <daylight>HADT</daylight> </short> </metazone> - It reads that "Pacific/Honolulu" has SHORT names only, i.e., HST/HDT, and LONG names are inherited from its meta zone, "Hawaii_Aleutian", i.e., "Hawaii-Aleutian Standard Time"/"Hawaii-Aleutian Daylight Time". - The existing logic in the JDK is, if there is some empty slot in the names, then they are retrieved from COMPAT's English names. In this case, COMPAT has: {"Pacific/Honolulu", HST}, String HST[] = new String[] {"Hawaii Standard Time", "HST", "Hawaii Daylight Time", "HDT", "Hawaii Time", "HT"}; Thus the missing LONG names are substituted with "Hawaii Standard Time"/"Hawaii Daylight Time".
10-02-2020

First issue is due to the discrepancy coming from treating English locale and others differently. English names are pre-filled at build time, but localized names for other locales are composed at run time. To keep consistency, it is desired to remove the pre-filled English names. For the second issue, this is working as expected. Some names (e.g., HAST) are coming from COMPAT provider for the locales that CLDR does not support. I changed the bug title referring only to the first issue.
07-02-2020

Thanks, I'll do that.
23-01-2020

Assigned JDK-8237641 to self. From the next time you can assign similar issues to me under core-libs/java.util:i18n, and I will triage whether it's a translation issue or CLDR converter issue.
22-01-2020

Yes. Since this is not a simple translation matter, it should be fixed in CLDRConverter.
22-01-2020

Naoto, could you check JDK-8237641 also ? It's also CLDR related issue.
22-01-2020

Naoto, could you handle this issue ? Please let me know if you have further question.
22-01-2020

Thanks, Leo. Waiting for your notification.
21-01-2020

I'm working on the update of TimeZoneNames translation currently, so pls don't rush to fix something. Will update the bug url here once I create it.
20-01-2020

Please re-assign if this is not for you [~itakiguchi]
29-12-2019