You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a rare scenario where the result may be off (usually by an hour) when the result of an addition to an Instant is in a time overlap and the source Instant has the lesser offset of the two possible in the overlap. Then, the overlap is resolved incorrectly.
val zone =TimeZone.of("Europe/Berlin")
val instant1 =LocalDateTime(2019, Month.OCTOBER, 27, 2, 59).toInstant(zone)
val instant2 =LocalDateTime(2019, Month.OCTOBER, 28, 2, 59).toInstant(zone)
val instant3 = instant1.minus(300, DateTimeUnit.DAY, zone)
val instant4 = instant1.minus(10, DateTimeUnit.MONTH, zone)
assertEquals(instant1.plus(DateTimeUnit.HOUR), instant2.plus(-1, DateTimeUnit.DAY, zone))
assertEquals(instant1.plus(DateTimeUnit.HOUR), instant3.plus(300, DateTimeUnit.DAY, zone))
assertEquals(instant1.plus(DateTimeUnit.HOUR), instant4.plus(10, DateTimeUnit.MONTH, zone))
All these assertions fail on Darwin and Windows but pass in the other implementations (JVM, Unix, JS).
The text was updated successfully, but these errors were encountered:
There is a rare scenario where the result may be off (usually by an hour) when the result of an addition to an
Instant
is in a time overlap and the sourceInstant
has the lesser offset of the two possible in the overlap. Then, the overlap is resolved incorrectly.All these assertions fail on Darwin and Windows but pass in the other implementations (JVM, Unix, JS).
The text was updated successfully, but these errors were encountered: