Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
naotoj committed Sep 12, 2024
1 parent 35a94b7 commit b95c529
Show file tree
Hide file tree
Showing 18 changed files with 1,241 additions and 1,252 deletions.
14 changes: 10 additions & 4 deletions make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,10 @@ private static Map<String, Object> extractZoneNames(Map<String, Object> map, Str
String tzKey = Optional.ofNullable((String)handlerSupplMeta.get(tzid))
.orElse(tzid);
// Follow link, if needed
var tzLink = tzdbLinks.get(tzKey);
String tzLink = null;
for (String t = tzKey; tzdbLinks.containsKey(t);) {
t = tzLink = tzdbLinks.get(t);
}
if (tzLink == null && tzdbLinks.containsValue(tzKey)) {
// reverse link search
// this is needed as in tzdb, "America/Buenos_Aires" links to
Expand Down Expand Up @@ -1213,9 +1216,11 @@ private static void generateZoneName() throws Exception {
// This method assumes handlerMetaZones is already initialized
private static Set<String> getAvailableZoneIds() {
assert handlerMetaZones != null;
assert tzdbLinks != null;
if (AVAILABLE_TZIDS == null) {
AVAILABLE_TZIDS = new HashSet<>(ZoneId.getAvailableZoneIds());
AVAILABLE_TZIDS.addAll(handlerMetaZones.keySet());
AVAILABLE_TZIDS.addAll(tzdbLinks.keySet());
AVAILABLE_TZIDS.remove(MetaZonesParseHandler.NO_METAZONE_KEY);
}

Expand Down Expand Up @@ -1492,10 +1497,11 @@ private static void fillTZDBShortNames(String tzid, String[] names) {
* If it cannot recognize the pattern, return the argument as is.
*/
private static String convertGMTName(String f) {
if (f.equals("%z")) {
// Generate GMT format at runtime
return null;
}
try {
// Should pre-fill GMT format once COMPAT is gone.
// Till then, fall back to GMT format at runtime, after COMPAT short
// names are populated
ZoneOffset.of(f);
return null;
} catch (DateTimeException dte) {
Expand Down
6 changes: 3 additions & 3 deletions src/java.base/share/classes/java/time/ZoneId.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ public abstract sealed class ZoneId implements Serializable permits ZoneOffset,
entry("PST", "America/Los_Angeles"),
entry("SST", "Pacific/Guadalcanal"),
entry("VST", "Asia/Ho_Chi_Minh"),
entry("EST", "-05:00"),
entry("MST", "-07:00"),
entry("HST", "-10:00")
entry("EST", "America/Panama"),
entry("MST", "America/Phoenix"),
entry("HST", "Pacific/Honolulu")
);
/**
* Serialization version.
Expand Down
10 changes: 7 additions & 3 deletions src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,13 @@ private static void addOldMapping() {
aliases.put("MST", "America/Denver");
aliases.put("HST", "Pacific/Honolulu");
} else {
zones.put("EST", new ZoneInfo("EST", -18000000));
zones.put("MST", new ZoneInfo("MST", -25200000));
zones.put("HST", new ZoneInfo("HST", -36000000));
// zones.put("EST", new ZoneInfo("EST", -18000000));
// zones.put("MST", new ZoneInfo("MST", -25200000));
// zones.put("HST", new ZoneInfo("HST", -36000000));
/*if (zones.containsKey("EST"))*/ System.out.println("EST is here!");
aliases.put("EST", "America/Panama");
aliases.put("MST", "America/Phoenix");
aliases.put("HST", "Pacific/Honolulu");
}
}

Expand Down
25 changes: 1 addition & 24 deletions src/java.base/share/data/tzdata/VERSION
Original file line number Diff line number Diff line change
@@ -1,24 +1 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
tzdata2024a
tzdata2024b
96 changes: 42 additions & 54 deletions src/java.base/share/data/tzdata/africa
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# tzdb data for Africa and environs

# This file is in the public domain, so clarified as of
Expand Down Expand Up @@ -126,17 +103,16 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 16

# Cape Verde / Cabo Verde
#
# From Paul Eggert (2018-02-16):
# Shanks gives 1907 for the transition to +02.
# For now, ignore that and follow the 1911-05-26 Portuguese decree
# (see Europe/Lisbon).
# From Tim Parenti (2024-07-01), per Paul Eggert (2018-02-16):
# For timestamps before independence, see commentary for Europe/Lisbon.
# Shanks gives 1907 instead for the transition to -02.
#
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2:00u # Praia
-2:00 - -02 1942 Sep
-2:00 1:00 -01 1945 Oct 15
-2:00 - -02 1975 Nov 25 2:00
-1:00 - -01
-2:00 - %z 1942 Sep
-2:00 1:00 %z 1945 Oct 15
-2:00 - %z 1975 Nov 25 2:00
-1:00 - %z

# Chad
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Expand Down Expand Up @@ -368,14 +344,12 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct

# Guinea-Bissau
#
# From Paul Eggert (2018-02-16):
# Shanks gives 1911-05-26 for the transition to WAT,
# evidently confusing the date of the Portuguese decree
# (see Europe/Lisbon) with the date that it took effect.
# From Tim Parenti (2024-07-01), per Paul Eggert (2018-02-16):
# For timestamps before independence, see commentary for Europe/Lisbon.
#
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 1:00u
-1:00 - -01 1975
-1:00 - %z 1975
0:00 - GMT

# Comoros
Expand Down Expand Up @@ -440,10 +414,10 @@ Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 1:00u

# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Nairobi 2:27:16 - LMT 1908 May
2:30 - +0230 1928 Jun 30 24:00
2:30 - %z 1928 Jun 30 24:00
3:00 - EAT 1930 Jan 4 24:00
2:30 - +0230 1936 Dec 31 24:00
2:45 - +0245 1942 Jul 31 24:00
2:30 - %z 1936 Dec 31 24:00
2:45 - %z 1942 Jul 31 24:00
3:00 - EAT

# Liberia
Expand Down Expand Up @@ -614,7 +588,7 @@ Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 -
Rule Mauritius 2009 only - Mar lastSun 2:00 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
4:00 Mauritius +04/+05
4:00 Mauritius %z
# Agalega Is, Rodriguez
# no information; probably like Indian/Mauritius

Expand Down Expand Up @@ -1094,10 +1068,10 @@ Rule Morocco 2087 only - May 11 2:00 0 -

# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26
0:00 Morocco +00/+01 1984 Mar 16
1:00 - +01 1986
0:00 Morocco +00/+01 2018 Oct 28 3:00
1:00 Morocco +01/+00
0:00 Morocco %z 1984 Mar 16
1:00 - %z 1986
0:00 Morocco %z 2018 Oct 28 3:00
1:00 Morocco %z

# Western Sahara
#
Expand All @@ -1111,9 +1085,9 @@ Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26
# since most of it was then controlled by Morocco.

Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún
-1:00 - -01 1976 Apr 14
0:00 Morocco +00/+01 2018 Oct 28 3:00
1:00 Morocco +01/+00
-1:00 - %z 1976 Apr 14
0:00 Morocco %z 2018 Oct 28 3:00
1:00 Morocco %z

# Botswana
# Burundi
Expand All @@ -1124,13 +1098,27 @@ Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún
# Zambia
# Zimbabwe
#
# Shanks gives 1903-03-01 for the transition to CAT.
# Perhaps the 1911-05-26 Portuguese decree
# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf
# merely made it official?
# From Tim Parenti (2024-07-01):
# For timestamps before Mozambique's independence, see commentary for
# Europe/Lisbon.
#
# From Paul Eggert (2024-05-24):
# The London Gazette, 1903-04-03, page 2245, says that
# as of 1903-03-03 a time ball at the port of Lourenço Marques
# (as Maputo was then called) was dropped daily at 13:00:00 LMT,
# corresponding to 22:49:41.7 GMT, so local time was +02:10:18.3.
# Conversely, the newspaper South Africa, 1909-02-09, page 321,
# says the port had just installed an apparatus that communicated
# "from the controlling clock in the new Observatory at Reuben Point ...
# exact mean South African time, i.e., 30 deg., or 2 hours East of Greenwich".
# Although Shanks gives 1903-03-01 for the transition to CAT,
# evidently the port transitioned to CAT after 1903-03-03 but before
# the Portuguese legal transition of 1912-01-01 (see Europe/Lisbon commentary).
# For lack of better info, list 1909 as the transition date.
#
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Maputo 2:10:20 - LMT 1903 Mar
#STDOFF 2:10:18.3
Zone Africa/Maputo 2:10:18 - LMT 1909
2:00 - CAT

# Namibia
Expand Down Expand Up @@ -1195,7 +1183,7 @@ Rule Namibia 1995 2017 - Apr Sun>=1 2:00 -1:00 WAT

# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8
1:30 - +0130 1903 Mar
1:30 - %z 1903 Mar
2:00 - SAST 1942 Sep 20 2:00
2:00 1:00 SAST 1943 Mar 21 2:00
2:00 - SAST 1990 Mar 21 # independence
Expand Down Expand Up @@ -1283,7 +1271,7 @@ Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8
Zone Africa/Lagos 0:13:35 - LMT 1905 Jul 1
0:00 - GMT 1908 Jul 1
0:13:35 - LMT 1914 Jan 1
0:30 - +0030 1919 Sep 1
0:30 - %z 1919 Sep 1
1:00 - WAT

# São Tomé and Príncipe
Expand Down
81 changes: 29 additions & 52 deletions src/java.base/share/data/tzdata/antarctica
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# tzdb data for Antarctica and environs

# This file is in the public domain, so clarified as of
Expand Down Expand Up @@ -110,34 +87,34 @@

# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Antarctica/Casey 0 - -00 1969
8:00 - +08 2009 Oct 18 2:00
11:00 - +11 2010 Mar 5 2:00
8:00 - +08 2011 Oct 28 2:00
11:00 - +11 2012 Feb 21 17:00u
8:00 - +08 2016 Oct 22
11:00 - +11 2018 Mar 11 4:00
8:00 - +08 2018 Oct 7 4:00
11:00 - +11 2019 Mar 17 3:00
8:00 - +08 2019 Oct 4 3:00
11:00 - +11 2020 Mar 8 3:00
8:00 - +08 2020 Oct 4 0:01
11:00 - +11 2021 Mar 14 0:00
8:00 - +08 2021 Oct 3 0:01
11:00 - +11 2022 Mar 13 0:00
8:00 - +08 2022 Oct 2 0:01
11:00 - +11 2023 Mar 9 3:00
8:00 - +08
8:00 - %z 2009 Oct 18 2:00
11:00 - %z 2010 Mar 5 2:00
8:00 - %z 2011 Oct 28 2:00
11:00 - %z 2012 Feb 21 17:00u
8:00 - %z 2016 Oct 22
11:00 - %z 2018 Mar 11 4:00
8:00 - %z 2018 Oct 7 4:00
11:00 - %z 2019 Mar 17 3:00
8:00 - %z 2019 Oct 4 3:00
11:00 - %z 2020 Mar 8 3:00
8:00 - %z 2020 Oct 4 0:01
11:00 - %z 2021 Mar 14 0:00
8:00 - %z 2021 Oct 3 0:01
11:00 - %z 2022 Mar 13 0:00
8:00 - %z 2022 Oct 2 0:01
11:00 - %z 2023 Mar 9 3:00
8:00 - %z
Zone Antarctica/Davis 0 - -00 1957 Jan 13
7:00 - +07 1964 Nov
7:00 - %z 1964 Nov
0 - -00 1969 Feb
7:00 - +07 2009 Oct 18 2:00
5:00 - +05 2010 Mar 10 20:00u
7:00 - +07 2011 Oct 28 2:00
5:00 - +05 2012 Feb 21 20:00u
7:00 - +07
7:00 - %z 2009 Oct 18 2:00
5:00 - %z 2010 Mar 10 20:00u
7:00 - %z 2011 Oct 28 2:00
5:00 - %z 2012 Feb 21 20:00u
7:00 - %z
Zone Antarctica/Mawson 0 - -00 1954 Feb 13
6:00 - +06 2009 Oct 18 2:00
5:00 - +05
6:00 - %z 2009 Oct 18 2:00
5:00 - %z
# References:
# Casey Weather (1998-02-26)
# http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html
Expand Down Expand Up @@ -313,10 +290,10 @@ Zone Antarctica/Troll 0 - -00 2005 Feb 12

# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Antarctica/Vostok 0 - -00 1957 Dec 16
7:00 - +07 1994 Feb
7:00 - %z 1994 Feb
0 - -00 1994 Nov
7:00 - +07 2023 Dec 18 2:00
5:00 - +05
7:00 - %z 2023 Dec 18 2:00
5:00 - %z

# S Africa - year-round bases
# Marion Island, -4653+03752
Expand Down Expand Up @@ -349,7 +326,7 @@ Zone Antarctica/Vostok 0 - -00 1957 Dec 16
#
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Antarctica/Rothera 0 - -00 1976 Dec 1
-3:00 - -03
-3:00 - %z

# Uruguay - year round base
# Artigas, King George Island, -621104-0585107
Expand Down
Loading

0 comments on commit b95c529

Please sign in to comment.