RFR: 8285844: TimeZone.getTimeZone(ZoneOffset) does not work for all ZoneOffsets and returns GMT unexpected [v2]
Uwe Schindler
uschindler at openjdk.java.net
Wed May 11 08:36:35 UTC 2022
On Wed, 11 May 2022 08:10:56 GMT, Stephen Colebourne <scolebourne at openjdk.org> wrote:
>> Added them except "UTC+...", as it is not recognizable as a Custom ID.
>
> Can the test cover `UT` prefix as well? (This is another valid prefix in `ZoneId`)
>
> If this PR isn't meant to work with UTC prefix, can a test be added that proves it does *not* work.
>
> ie. all these are valid in `ZoneId` - "Z", "UTC", "GMT", "UT", "UTC+01:00", "GMT+01:00", "UT+01:00" - and all should have some form of associated test.
I tried it out: If you create a ZoneId with prefixes "UT" and "UTC", they fail to convert to TimeZone. Same happens if you use this as String name in `TimeZone#getTimeZone(String)`. This is another bug / missing feature! It does not work with or without this PR.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8606
More information about the core-libs-dev
mailing list