Skip to content

Commit beaff75

Browse files
committed
Delay TimeZone from static initialization
With defaultTimeZone initialized statically, any call to ConvertKt, even not related to TZ, triggers loading kotlinx.datetime dependency. We use ConvertKt in plugin, but including this dependency is not desirable
1 parent b8e90f8 commit beaff75

File tree

1 file changed

+1
-1
lines changed
  • core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api

1 file changed

+1
-1
lines changed

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api/convert.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ internal fun Instant.toLocalDate(zone: TimeZone = defaultTimeZone) = toLocalDate
725725

726726
internal fun Instant.toLocalTime(zone: TimeZone = defaultTimeZone) = toLocalDateTime(zone).time
727727

728-
internal val defaultTimeZone = TimeZone.currentSystemDefault()
728+
internal val defaultTimeZone get() = TimeZone.currentSystemDefault()
729729

730730
internal fun Number.toBigDecimal(): BigDecimal =
731731
when (this) {

0 commit comments

Comments
 (0)