JDK-8340478 : Remove JDK1.1 compatible behavior for "EST", "MST", and "HST" time zones
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 24
  • Submitted: 2024-09-19
  • Updated: 2024-10-18
  • Resolved: 2024-10-18
Related Reports
CSR :  
Description
Summary
-------

Remove JDK1.1 compatible behavior for "EST", "MST", and "HST" time zones.

Problem
-------

In JDK1.1, `TimeZone` class had time zones "EST", "MST", and "HST" as links to "America/New_York", "America/Denver", and "Pacific/Honolulu" time zones which have since been deprecated (https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/util/TimeZone.html#three-letter-time-zone-ids-heading). Then in JDK8, with the introduction of `java.time` package, these three time zones are switched to fixed offset time zones, "-05:00", "-07:00", and "-10:00" respectively. The implementation also allowed to flip the mappings to JDK1.1 compatible one, with the non-public system property `sun.timezone.ids.oldmapping` set to `true`/`yes`. However, the latest TZDB (2024b) changed the definitions of those time zones to links to "America/Panama", "America/Phoenix", and "Pacific/Honolulu" respectively, which was discussed in the CSR JDK-8340138. Thus the JDK1.1 compatible switch is now moot, and should be removed. Keeping dual behavior for those time zones makes the code complex.

Solution
--------

Remove the internal system property `sun.timezone.ids.oldmapping` and related code/tests. Those three time zones remain intact, only removing the compatibility switching capability.

Specification
-------------

N/A. Behavior change only.


Comments
Moving to Approved; I see a release note is already planned.
18-10-2024