kotest-assertions-core / io.kotest.matchers.date / java.time.ZonedDateTime / atSameZone

atSameZone

fun ZonedDateTime.atSameZone(): Matcher<ZonedDateTime>

Matcher that uses actual timezone on the expected ZonedDateTime

ZonedDateTime.of(2019, 12, 10, 10, 0, 0, 0, ZoneOffset.UTC) shouldBe
    ZonedDateTime.of(2019, 12, 10, 4, 0, 0, 0, ZoneId.of("America/Chicago")).atSameZone() // Assertion passes