Hi, I have a DateTimePeriod from an API, and I wan...
# getting-started
a
Hi, I have a DateTimePeriod from an API, and I want to convert it to
Clock.System.now()
+ the period as an Instant, how do I do this ?
i
You can use Instant.plus function taking DateTimePeriod and TimeZone: https://github.com/Kotlin/kotlinx-datetime/blob/v0.3.2/core/common/src/Instant.kt#L180-L187
a
Oh it takes a TimeZone as second argument, this is why I wasn't finding it with just the
+
operator, thanks !