diff --git a/quartz/build.gradle.kts b/quartz/build.gradle.kts index e15428326..be89e1e5d 100644 --- a/quartz/build.gradle.kts +++ b/quartz/build.gradle.kts @@ -107,7 +107,7 @@ kotlin { implementation(libs.kotlinx.serialization.json) // in your shared module's dependencies block - implementation( libs.kotlinx.datetime) + // implementation( libs.kotlinx.datetime) // immutable collections to avoid recomposition implementation(libs.kotlinx.collections.immutable) diff --git a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip03Timestamp/ots/VerifyResult.kt b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip03Timestamp/ots/VerifyResult.kt index d0cf6daa5..7b368c37c 100644 --- a/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip03Timestamp/ots/VerifyResult.kt +++ b/quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/nip03Timestamp/ots/VerifyResult.kt @@ -20,12 +20,6 @@ */ package com.vitorpamplona.quartz.nip03Timestamp.ots -import kotlinx.datetime.TimeZone -import kotlinx.datetime.number -import kotlinx.datetime.toLocalDateTime -import kotlin.time.ExperimentalTime -import kotlin.time.Instant - /** * Class that lets us compare, sort, store and print timestamps. */ @@ -38,19 +32,12 @@ class VerifyResult( /** * Returns, if existing, a string representation describing the existence of a block attest */ - @OptIn(ExperimentalTime::class) override fun toString(): String { if (height == 0 || timestamp == null) { return "" } - // 1. Create an Instant from the Unix timestamp (milliseconds) - val instant = Instant.fromEpochMilliseconds(timestamp * 1000) - - // 2. Convert the Instant to a LocalDateTime in the UTC time zone - val dateTime = instant.toLocalDateTime(TimeZone.UTC) - - return "block $height attests data existed as of ${dateTime.year}-${dateTime.month.number}-${dateTime.day} UTC" + return "block $height attests data existed as of unix timestamp of $timestamp" } override fun compareTo(other: VerifyResult): Int = this.height - other.height