<i18n dev> RFR: 8285844: TimeZone.getTimeZone(ZoneOffset) does not work for all ZoneOffsets and returns GMT unexpected

Jaikiran Pai jpai at openjdk.java.net
Tue May 10 13:15:47 UTC 2022


On Mon, 9 May 2022 18:59:43 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> This is to extend the `Custom ID`s in `java.util.TimeZone` class to support second-level resolution, enabling round trips with `java.time.ZoneOffset`s. Corresponding CSR is also being drafted.

src/java.base/share/classes/java/util/TimeZone.java line 109:

> 107:  * <blockquote><pre>
> 108:  * <a id="NormalizedCustomID"><i>NormalizedCustomID:</i></a>
> 109:  *         {@code GMT} <i>Sign</i> <i>TwoDigitHours</i> {@code :} <i>Minutes</i> [<i>Seconds</i>]

Hello Naoto,

Should this instead be: `... <i>Minutes</i> [{@code :} <i>Seconds</i>]` - i.e. should it have the `:` literal if seconds are present in the custom timezone id?

-------------

PR: https://git.openjdk.java.net/jdk/pull/8606


More information about the i18n-dev mailing list