<i18n dev> Integrated: 8377013: TimeZone.getDefault() returns obsolete id on Windows (Asia/Calcutta)
Naoto Sato
naoto at openjdk.org
Wed Feb 11 09:46:20 UTC 2026
On Thu, 5 Feb 2026 17:27:22 GMT, Naoto Sato <naoto at openjdk.org> wrote:
> Fixing the Windows default time zones returned from `TimeZone.getDefault()` for some regions. On Windows, it uses their own regions for time zones that aren't 1-1 match to IANA's TZ database. Thus a mapping table is created as `conf/tzmappings` on Windows Java runtime. It is derived from CLDR's `windowsZones.xml` but it uses the obsolete IANA ids for their compatibility reasons. The fix is to replace the CLDR's old ids to the latest IANA ids for those regions.
> Since it is hard to provide an automated test, as it involves the modification of the Windows' default time zone, regression test is not provided. Instead the fix is manually confirmed using the JIRA issue's example. Since this is a change in behavior, I will file a corresponding CSR/RN.
>
> Here is the diff of the generated `conf/tzmappings` for reference:
>
> @@ -13,7 +13,7 @@
> Arabian Standard Time:ZZ:Etc/GMT-4:
> Arabian Standard Time:001:Asia/Dubai:
> Arabic Standard Time:001:Asia/Baghdad:
> -Argentina Standard Time:001:America/Buenos_Aires:
> +Argentina Standard Time:001:America/Argentina/Buenos_Aires:
> Astrakhan Standard Time:001:Europe/Astrakhan:
> Atlantic Standard Time:BM:Atlantic/Bermuda:
> Atlantic Standard Time:GL:America/Thule:
> @@ -58,7 +58,7 @@
> Central European Standard Time:MK:Europe/Skopje:
> Central European Standard Time:001:Europe/Warsaw:
> Central Pacific Standard Time:AQ:Antarctica/Casey:
> -Central Pacific Standard Time:FM:Pacific/Ponape:
> +Central Pacific Standard Time:FM:Pacific/Pohnpei:
> Central Pacific Standard Time:NC:Pacific/Noumea:
> Central Pacific Standard Time:VU:Pacific/Efate:
> Central Pacific Standard Time:ZZ:Etc/GMT-11:
> @@ -75,7 +75,7 @@
> Dateline Standard Time:001:Etc/GMT+12:
> E. Africa Standard Time:AQ:Antarctica/Syowa:
> E. Africa Standard Time:DJ:Africa/Djibouti:
> -E. Africa Standard Time:ER:Africa/Asmera:
> +E. Africa Standard Time:ER:Africa/Asmara:
> E. Africa Standard Time:ET:Africa/Addis_Ababa:
> E. Africa Standard Time:KM:Indian/Comoro:
> E. Africa Standard Time:MG:Indian/Antananarivo:
> @@ -101,10 +101,10 @@
> FLE Standard Time:FI:Europe/Helsinki:
> FLE Standard Time:LT:Europe/Vilnius:
> FLE Standard Time:LV:Europe/Riga:
> -FLE Standard Time:001:Europe/Kiev:
> +FLE Standard Time:001:Europe/Kyiv:
> Fiji Standard Time:001:Pacific/Fiji:
> GMT Standard Time:ES:Atlantic/Canary:
> -GMT Standard Time:FO:Atlantic/Faeroe:
> +GMT Standard Time:FO:Atlantic/Faroe:
> GMT Standard Time:GG:Europe/Guernsey:
> GMT Standard Time:IE:Europe/Dublin:
> GMT Standard Time:IM:Europe/Isle_of_Man:
> @@ -115,7 +115,7 @@
> GTB St...
This pull request has now been integrated.
Changeset: 21d4c6c6
Author: Naoto Sato <naoto at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/21d4c6c68fc1199275b3317cd64ae24c8aeca003
Stats: 34 lines in 3 files changed: 29 ins; 0 del; 5 mod
8377013: TimeZone.getDefault() returns obsolete id on Windows (Asia/Calcutta)
Reviewed-by: jlu
-------------
PR: https://git.openjdk.org/jdk/pull/29591
More information about the i18n-dev
mailing list