<i18n dev> RFR: 8177819: DateTimeFormatterBuilder zone parsing should recognise DST [v3]

Naoto Sato naoto at openjdk.java.net
Mon Nov 29 17:41:40 UTC 2021


On Thu, 25 Nov 2021 08:26:56 GMT, Stephen Colebourne <scolebourne at openjdk.org> wrote:

>> Naoto Sato has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Replaced integer literals.
>>  - Refined wording #2
>
> src/java.base/share/classes/java/time/format/DateTimeFormatter.java line 508:
> 
>> 506:  * of {@link ChronoLocalDateTime#atZone(ZoneId)}. If the {@code ZoneId} was
>> 507:  * parsed from the zone name that does not indicate daylight saving time, then
>> 508:  * the standard offset will be used at the local time-line overlap.
> 
> As written, I would read it as being the generic zone name that gets altered, rather than a zone name that explicitly indicates "winter" time. maybe:
> 
> "If the {@code ZoneId} was parsed from a zone name that indicates whether daylight saving time in in operation or not, then that fact will be used to select the correct offset at the local time-line overlap."

Modified as suggested.

> src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 4906:
> 
>> 4904:         private static class LENIENT extends CI {
>> 4905: 
>> 4906:             private LENIENT(String k, String v, int t, PrefixTree child) {
> 
> Is class `LENIENT` actually in use?

Removed.

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

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


More information about the i18n-dev mailing list