On Mon, 30 May 2022 15:40:37 GMT, Gaurav Chaudhari <d...@openjdk.java.net> 
wrote:

>> This fix ensures that when a lookup for a custom TZ code fails, and an 
>> attempt is made to find the GMT offset in order to get the current time, 
>> Daylight savings rules are applied correctly.
>
> Gaurav Chaudhari has updated the pull request incrementally with two 
> additional commits since the last revision:
> 
>  - Merge branch '8285838' of github.com:Deigue/jdk into 8285838
>  - Merge branch '8285838' of github.com:Deigue/jdk into 8285838

test/jdk/java/util/TimeZone/CustomTzIDCheckDST.java line 67:

> 65:         if ((month > Month.MARCH.getValue() && month < 
> Month.OCTOBER.getValue()) ||
> 66:                 (month == Month.MARCH.getValue() && 
> date.isAfter(getLastSundayOfMonth(date))) ||
> 67:                 (month == Month.OCTOBER.getValue() && 
> date.isBefore(getLastSundayOfMonth(date)))) {

I don't think these conditions are correct, as `month` is zero-based, and 
comparing it with `Month.MARCH` will be incorrect. The same holds for October.

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

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

Reply via email to