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
In 2023, the conversion from EDT to EST happened at 2023-11-05T06:00:00Z in America/New_York. This was a shift backwards of one hour in local time. On JVM, Linux, and Apple targets this conversion is calculated properly. However, on the mingwX64 target, this time difference is improperly calculated. The following test fails on the Windows target, but passes for all other available targets.
@Test funcalculated_instant_is_correct() {
val tz =TimeZone.of("America/New_York")
val expected =Instant.parse("2023-11-05T07:00:00Z")
val actual =LocalDateTime(year =2023, monthNumber =11, dayOfMonth =5, hour =2, minute =0).toInstant(tz)
assertEquals(expected, actual)
}
With the following error message
io.github.kevincianfarini.cardiologist.SuspendingTests.calculated_instant_is_correct[mingwX64] FAILED
kotlin.AssertionError: Expected <2023-11-05T07:00:00Z>, actual <2023-11-05T06:00:00Z>.
In case it's useful, here's a reference clock aligning UTC and America/New_York during the instant in question.