Hey! Is there an existing way to convert a `java.t...
# kotlinx-datetime
g
Hey! Is there an existing way to convert a
java.time.Clock
to a
kotlinx.datetime.Clock
? I was looking for an extension/helper function but couldn’t see one. It’s a trivial wrapper, but maybe it exists somewhere already?
Copy code
val ktClock = object : kotlinx.datetime.Clock {
    override fun now() = javaClock.instant().toKotlinInstant()
}
h
g