JDK-8339644 : Improve parsing of Day/Month in tzdata rules
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.time
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2024-09-06
  • Updated: 2025-01-20
  • Resolved: 2024-09-09
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 17 JDK 21 JDK 23 JDK 24 JDK 7 JDK 8
11.0.26-oracleFixed 17.0.14-oracleFixed 21.0.6-oracleFixed 23.0.2Fixed 24 b15Fixed 7u451Fixed 8u441Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
TzdbZoneRulesProvider currently parses tzdata rules with the assumption that the shortened Day or Month values will be used (e.g. "Mon" instead of "Monday")

According to the zic man page, which the tzdata format adheres to, the long or short name may be used:

===
       IN     Names the month in which the rule takes effect.  Month
              names may be abbreviated.

       ON     Gives the day on which the rule takes effect.  Recognized
              forms include:

                5        the fifth of the month
                lastSun  the last Sunday in the month
                lastMon  the last Monday in the month
                Sun>=8   first Sunday on or after the eighth
                Sun<=25  last Sunday on or before the 25th

              A weekday name (e.g., Sunday) or a weekday name preceded
              by “last” (e.g., lastSunday) may be abbreviated or spelled
              out in full.

===


Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk8u-dev/pull/615 Date: 2025-01-13 10:03:25 +0000
13-01-2025

[jdk8u-critical-request] Approval Request from Dmitry Cherepanov Required fix for upcoming tz updates. All relevant tests passed.
23-12-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk8u/pull/64 Date: 2024-12-10 19:11:17 +0000
10-12-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk23u/pull/159 Date: 2024-10-14 05:17:48 +0000
14-10-2024

Fix Request for 23u clean backport of https://git.openjdk.org/jdk/commit/86a2f9c7dcb6585cabf03c0940511d11560e85b7
10-10-2024

[jdk11u-fix-request] Approval Request from Antonio Vieiro This is required to be able to parse the 2024b timezone breaking changes.
01-10-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk11u-dev/pull/2948 Date: 2024-10-01 09:33:37 +0000
01-10-2024

Fix request [17u,21u] I backport this for parity with 17.0.14-oracle,21.0.6-oracle. Required fix to prepare for upcoming tz updates Clean backport. Tests pass, but also without the fix. SAP nightly testing passed.
17-09-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk17u-dev/pull/2882 Date: 2024-09-16 06:14:43 +0000
16-09-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk21u-dev/pull/979 Date: 2024-09-16 06:10:58 +0000
16-09-2024

Hi [~coffeys], [~jjose], shouldn't this go to 23, too?
16-09-2024

Changeset: 86a2f9c7 Branch: master Author: Naoto Sato <naoto@openjdk.org> Date: 2024-09-09 16:04:59 +0000 URL: https://git.openjdk.org/jdk/commit/86a2f9c7dcb6585cabf03c0940511d11560e85b7
09-09-2024

Although TZDB is going to use the abbreviated name "Apr" for the upcoming release (as in Paul Eggert's reply to the list), the TZDB compiler should accept either full or unambiguous abbreviated names of any length.
07-09-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/20893 Date: 2024-09-06 17:40:50 +0000
06-09-2024

tzdata2024b release has broken logic for parsing rules: https://lists.iana.org/hyperkitty/list/tz@iana.org/thread/LBVCBNK5NPWBNQ5UDUY3YEZPWA2QV262/
06-09-2024