From 16b521fd229b59d774e8facfd75696dec5cec41d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 10:58:12 +0000 Subject: [PATCH] build(deps): bump org.jetbrains.kotlinx:kotlinx-datetime Bumps [org.jetbrains.kotlinx:kotlinx-datetime](https://github.com/Kotlin/kotlinx-datetime) from 0.6.2 to 0.7.0-0.6.x-compat. - [Release notes](https://github.com/Kotlin/kotlinx-datetime/releases) - [Changelog](https://github.com/Kotlin/kotlinx-datetime/blob/master/CHANGELOG.md) - [Commits](https://github.com/Kotlin/kotlinx-datetime/commits) --- updated-dependencies: - dependency-name: org.jetbrains.kotlinx:kotlinx-datetime dependency-version: 0.7.0-0.6.x-compat dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- gradle/libs.versions.toml | 2 +- .../commonMain/kotlin/org/modelix/model/lazy/CLVersion.kt | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8abf8c856a..aa23d13e7a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -52,7 +52,7 @@ kotlin-serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-s kotlin-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinSerialization" } kotlin-serialization-yaml = { group = "com.charleskorn.kaml", name = "kaml", version = "0.82.0" } kotlin-logging = { group = "io.github.microutils", name = "kotlin-logging", version = "3.0.5" } -kotlin-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version = "0.6.2" } +kotlin-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version = "0.7.0-0.6.x-compat" } kotlin-html = { group = "org.jetbrains.kotlinx", name = "kotlinx-html", version = "0.12.0" } kotlin-collections-immutable = { group = "org.jetbrains.kotlinx", name = "kotlinx-collections-immutable", version = "0.4.0" } kotlinJs = { module = "org.jetbrains.kotlin-wrappers:kotlin-js", version = "2025.6.10" } diff --git a/model-datastructure/src/commonMain/kotlin/org/modelix/model/lazy/CLVersion.kt b/model-datastructure/src/commonMain/kotlin/org/modelix/model/lazy/CLVersion.kt index 2e5bd096b5..ecb34a7a43 100644 --- a/model-datastructure/src/commonMain/kotlin/org/modelix/model/lazy/CLVersion.kt +++ b/model-datastructure/src/commonMain/kotlin/org/modelix/model/lazy/CLVersion.kt @@ -4,6 +4,7 @@ import kotlinx.datetime.Clock import kotlinx.datetime.Instant import kotlinx.datetime.LocalDateTime import kotlinx.datetime.TimeZone +import kotlinx.datetime.toDeprecatedInstant import kotlinx.datetime.toInstant import org.modelix.datastructures.model.IGenericModelTree import org.modelix.datastructures.model.asLegacyTree @@ -44,6 +45,7 @@ import org.modelix.streams.getBlocking import org.modelix.streams.plus import org.modelix.streams.query import kotlin.jvm.JvmName +import kotlin.time.ExperimentalTime class CLVersion(val obj: Object) : IVersion { @@ -78,7 +80,8 @@ class CLVersion(val obj: Object) : IVersion { return Instant.fromEpochSeconds(dateTimeStr.toLong()) } catch (ex: Exception) {} try { - return LocalDateTime.parse(dateTimeStr).toInstant(TimeZone.currentSystemDefault()) + @OptIn(ExperimentalTime::class) + return LocalDateTime.parse(dateTimeStr).toInstant(TimeZone.currentSystemDefault()).toDeprecatedInstant() } catch (ex: Exception) {} return null }