Skip to content

Commit afb3c43

Browse files
#485: Pass zoneId to TimeZoneRulesFoundation constructor to ensure proper initialization
1 parent 20161d7 commit afb3c43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/darwin/src/internal/TimeZoneNative.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal actual fun timeZoneById(zoneId: String): TimeZone =
1616
.getOrElse { timeZoneByIdFoundation(zoneId) }
1717

1818
internal fun timeZoneByIdFoundation(zoneId: String): TimeZone =
19-
RegionTimeZone(TimeZoneRulesFoundation(), zoneId)
19+
RegionTimeZone(TimeZoneRulesFoundation(zoneId), zoneId)
2020

2121
internal actual fun getAvailableZoneIds(): Set<String> =
2222
runCatching { tzdb.getOrThrow().availableTimeZoneIds() }

core/darwin/src/internal/TimeZoneRulesFoundation.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import kotlinx.datetime.Instant
99
import kotlinx.datetime.LocalDateTime
1010
import kotlinx.datetime.UtcOffset
1111

12-
internal class TimeZoneRulesFoundation : TimeZoneRules {
12+
internal class TimeZoneRulesFoundation(private val zoneId: String) : TimeZoneRules {
1313
override fun infoAtInstant(instant: Instant): UtcOffset {
1414
TODO("Not yet implemented")
1515
}

0 commit comments

Comments
 (0)