Skip to content

Commit 4a71673

Browse files
committed
Fix obtaining the current time zone on Windows
1 parent 5b93020 commit 4a71673

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/windows/src/TimeZoneNative.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ internal actual class RegionTimeZone(private val tzid: TimeZoneRules, actual ove
1919
}
2020

2121
actual fun currentSystemDefault(): RegionTimeZone {
22-
val zoneId = tzdbInRegistry.currentSystemDefault().second
23-
return of(zoneId.toString())
22+
val (name, zoneRules) = tzdbInRegistry.currentSystemDefault()
23+
return RegionTimeZone(zoneRules, name)
2424
}
2525

2626
actual val availableZoneIds: Set<String>
@@ -227,4 +227,4 @@ private fun offsetsAtDatetime(zone: DYNAMIC_TIME_ZONE_INFORMATION, dateTime: Loc
227227
private enum class GapHandling {
228228
MOVE_FORWARD,
229229
NEXT_CORRECT,
230-
}
230+
}

0 commit comments

Comments
 (0)