Zhang Zihan
05/26/2024, 12:00 PMUtcOffset
from TimeZone
. Why does the TimeZone.offsetAt(instant: Instant)
function need to be passed an Instant
instance? According to the documentation, Instant
is time zone independentmbonnin
05/26/2024, 12:12 PMZhang Zihan
05/26/2024, 12:20 PMprivate val instantZero = Instant.fromEpochSeconds(0)
val TimeZone.utcOffset get() = offsetAt(instantZero)
tz.offsetAt(anyInstant)
tz.utcOffset
mbonnin
05/26/2024, 12:21 PMmbonnin
05/26/2024, 12:23 PMZhang Zihan
05/26/2024, 12:30 PM