Re: RFR: 8285838: DST not applying properly with zone id offset set with TZ env variable [v4]
On Tue, 31 May 2022 17:21:50 GMT, Naoto Sato wrote: >> 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. Oh thats true, just verified this by printing out the values. Will fix by adding 1 to the month for sensible direct comparison against the singleton instances. - PR: https://git.openjdk.java.net/jdk/pull/8661
Re: RFR: 8285838: DST not applying properly with zone id offset set with TZ env variable [v4]
On Mon, 30 May 2022 15:40:37 GMT, Gaurav Chaudhari 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
Re: RFR: 8285838: DST not applying properly with zone id offset set with TZ env variable [v4]
> 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 - Changes: - all: https://git.openjdk.java.net/jdk/pull/8661/files - new: https://git.openjdk.java.net/jdk/pull/8661/files/b80af8bf..d7831659 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=8661=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8661=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8661.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8661/head:pull/8661 PR: https://git.openjdk.java.net/jdk/pull/8661