JDK-8341484 : TimeZone.toZoneId() throws exception when using old mapping for "HST"
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 24
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2024-10-03
  • Updated: 2024-10-03
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 24
24Unresolved
Description
TimeZone.toZoneId() throws exception for "HST" when the old mapping is used.

The culprit is in TimeZone.toZoneId0().

This method provides workarounds for "EST", "MST", and "HST" when the old mapping system property is true. However, it seems that "HST" was added with "America/Honolulu" when it should have been "Pacific/Honolulu".

Reproducer,

Set the system property "sun.timezone.ids.oldmapping" as true.
Then run, TimeZone.getTimeZone("MST").toZoneId()
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/21332 Date: 2024-10-03 19:46:48 +0000
03-10-2024