File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,19 @@ class TimeZoneNativeTest {
144144 }
145145 }
146146
147+ @Test
148+ fun shouldProduceConsistentUtcOffsetBetweenRegularAndFoundationTimeZones () {
149+ for ((zoneId, localDateTimes) in timeZoneRulesTestCases) {
150+ for (ldt in localDateTimes) {
151+ val regularTz = timeZoneById(zoneId)
152+ val foundationTz = timeZoneByIdFoundation(zoneId)
153+ val expected = regularTz.offsetAt(ldt.toInstant(regularTz))
154+ val actual = foundationTz.offsetAt(ldt.toInstant(foundationTz))
155+ assertEquals(expected, actual)
156+ }
157+ }
158+ }
159+
147160 // TimeZoneRules.infoAtDatetime(LocalDateTime) tests
148161
149162 private data class TimeZoneRulesTestData (val zoneId : String , val localDateTimes : List <LocalDateTime >)
You can’t perform that action at this time.
0 commit comments