윤동환
11/01/2023, 12:51 AMkevin.cianfarini
11/01/2023, 12:55 AMLocalDateTime
instances. Any conversion on local date time is ambiguous because of timezones and daylight savings time. You must instead do this conversion on Instant
.
val tz = TimeZone.UTC
val dt1 = LocalDateTime(...).toInstant(tz)
val dt2 = LocalDateTime(...).toInstant(tz)
val duration = dt1 - dt2
윤동환
11/01/2023, 1:00 AM