Skip to content

Commit

Permalink
8339637: (tz) Update Timezone Data to 2024b
Browse files Browse the repository at this point in the history
Reviewed-by: naoto, coffeys, jlu
  • Loading branch information
johnyjose30 committed Oct 16, 2024
1 parent e7cf25c commit ebc17c7
Show file tree
Hide file tree
Showing 23 changed files with 1,258 additions and 963 deletions.
18 changes: 9 additions & 9 deletions src/java.base/share/classes/java/time/ZoneId.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -186,15 +186,12 @@ public abstract sealed class ZoneId implements Serializable permits ZoneOffset,
* This map allows the IDs to continue to be used via the
* {@link #of(String, Map)} factory method.
* <p>
* This map contains a mapping of the IDs that is in line with TZDB 2005r and
* This map contains a mapping of the IDs that is in line with TZDB 2024b and
* later, where 'EST', 'MST' and 'HST' map to IDs which do not include daylight
* savings.
* savings since 1970. This mapping may change in update releases in support of new versions of TZDB.
* <p>
* This maps as follows:
* <ul>
* <li>EST - -05:00</li>
* <li>HST - -10:00</li>
* <li>MST - -07:00</li>
* <li>ACT - Australia/Darwin</li>
* <li>AET - Australia/Sydney</li>
* <li>AGT - America/Argentina/Buenos_Aires</li>
Expand All @@ -208,10 +205,13 @@ public abstract sealed class ZoneId implements Serializable permits ZoneOffset,
* <li>CTT - Asia/Shanghai</li>
* <li>EAT - Africa/Addis_Ababa</li>
* <li>ECT - Europe/Paris</li>
* <li>EST - America/Panama</li>
* <li>HST - Pacific/Honolulu</li>
* <li>IET - America/Indiana/Indianapolis</li>
* <li>IST - Asia/Kolkata</li>
* <li>JST - Asia/Tokyo</li>
* <li>MIT - Pacific/Apia</li>
* <li>MST - America/Phoenix</li>
* <li>NET - Asia/Yerevan</li>
* <li>NST - Pacific/Auckland</li>
* <li>PLT - Asia/Karachi</li>
Expand Down 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
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,11 @@ private static void addOldMapping() {
if (USE_OLDMAPPING) {
aliases.put("EST", "America/New_York");
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));
aliases.put("EST", "America/Panama");
aliases.put("MST", "America/Phoenix");
}
aliases.put("HST", "Pacific/Honolulu");
}

public static boolean useOldMapping() {
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/data/tzdata/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
tzdata2024a
tzdata2024b
73 changes: 42 additions & 31 deletions src/java.base/share/data/tzdata/africa
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,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 +367,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 +437,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 +611,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 +1091,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 +1108,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 +1121,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 +1206,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 +1294,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
58 changes: 29 additions & 29 deletions src/java.base/share/data/tzdata/antarctica
Original file line number Diff line number Diff line change
Expand Up @@ -110,34 +110,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 +313,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 +349,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

5 comments on commit ebc17c7

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lutkerd
Copy link
Contributor

@lutkerd lutkerd commented on ebc17c7 Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk21u-dev

@lutkerd
Copy link
Contributor

@lutkerd lutkerd commented on ebc17c7 Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on ebc17c7 Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lutkerd Could not automatically backport ebc17c7c to openjdk/jdk21u-dev due to conflicts in the following files:

  • test/jdk/java/text/Format/DateFormat/TimeZoneNameTest.java

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk21u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk21u-dev.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-lutkerd-ebc17c7c-master

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git ebc17c7c8d6febd5a887309d1b7a466bcd2cc0a9

# Backport the commit
$ git cherry-pick --no-commit ebc17c7c8d6febd5a887309d1b7a466bcd2cc0a9
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport ebc17c7c8d6febd5a887309d1b7a466bcd2cc0a9'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk21u-dev with the title Backport ebc17c7c8d6febd5a887309d1b7a466bcd2cc0a9.

Below you can find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit ebc17c7c from the openjdk/jdk repository.

The commit being backported was authored by Johny Jose on 16 Oct 2024 and was reviewed by Naoto Sato, Sean Coffey and Justin Lu.

Thanks!

@openjdk
Copy link

@openjdk openjdk bot commented on ebc17c7 Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lutkerd Could not automatically backport ebc17c7c to openjdk/jdk17u-dev due to conflicts in the following files:

  • src/java.base/share/classes/java/time/ZoneId.java
  • test/jdk/java/text/Format/DateFormat/TimeZoneNameTest.java
  • test/jdk/sun/util/resources/TimeZone/Bug4848242.java

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk17u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk17u-dev.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-lutkerd-ebc17c7c-master

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git ebc17c7c8d6febd5a887309d1b7a466bcd2cc0a9

# Backport the commit
$ git cherry-pick --no-commit ebc17c7c8d6febd5a887309d1b7a466bcd2cc0a9
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport ebc17c7c8d6febd5a887309d1b7a466bcd2cc0a9'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk17u-dev with the title Backport ebc17c7c8d6febd5a887309d1b7a466bcd2cc0a9.

Below you can find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit ebc17c7c from the openjdk/jdk repository.

The commit being backported was authored by Johny Jose on 16 Oct 2024 and was reviewed by Naoto Sato, Sean Coffey and Justin Lu.

Thanks!

Please sign in to comment.