-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
Update spec of java.util.TimeZone to fully define deprecated IDS.
-
Java API
-
SE
Summary
Link the full list of deprecated 3-letter IDs in java.util.TimeZone.
Problem
java.util.TimeZone
states that there are deprecated 3-letter IDs, but does not actually define all of them in the class specification. Since they are not defined, one may try to filter out the 3-letter IDs themselves. The full list should be explicitly defined.
Solution
Link to the full list in java.time.ZoneId
.
Specification
--- a/src/java.base/share/classes/java/util/TimeZone.java
+++ b/src/java.base/share/classes/java/util/TimeZone.java
* For compatibility with JDK 1.1.x, some other three-letter time zone IDs
* (such as "PST", "CTT", "AST") are also supported. However, <strong>their
* use is deprecated</strong> because the same abbreviation is often used
* for multiple time zones (for example, "CST" could be U.S. "Central Standard
* Time" and "China Standard Time"), and the Java platform can then only
- * recognize one of them.
+ * recognize one of them. The full list of deprecated three-letter time
+ * zone IDs and their mappings can be viewed at {@link java.time.ZoneId#SHORT_IDS}.
- csr of
-
JDK-8311968 Clarify Three-letter time zone IDs in java.util.TimeZone
-
- Resolved
-