jQrgen
02/12/2024, 9:06 AMval ldt = LocalDateTime.ofInstant(Instant.ofEpochMilli(d.firstRecv), ZoneId.systemDefault())
Currently, it's not working on iOS:
Uncaught Kotlin exception: kotlinx.datetime.DateTimeArithmeticException: Instant +1000000-12-31T23:59:59.999999999Z is not representable as LocalDateTime.
Joel Denke
02/12/2024, 9:08 AMClock.System.now().toLocalDateTime(TimeZone.UTC)
Use kotlinx datetime library.
toLocalDateTime is an extension in that library πjQrgen
02/12/2024, 9:10 AMinstant:Long
?jQrgen
02/12/2024, 9:10 AMJoel Denke
02/12/2024, 9:10 AMJoel Denke
02/12/2024, 9:13 AMJoel Denke
02/12/2024, 9:13 AMJoel Denke
02/12/2024, 9:13 AMClock.System.todayIn(TimeZone.currentSystemDefault())
Joel Denke
02/12/2024, 9:14 AMJoel Denke
02/12/2024, 9:15 AMInstant.fromEpochMilliseconds(d.firstRecv).toLocalDateTime(TimeZone.currentSystemDefault())
I think in your case will be something like this πjQrgen
02/12/2024, 9:15 AMjQrgen
02/12/2024, 9:16 AMjQrgen
02/12/2024, 9:16 AMjQrgen
02/12/2024, 9:17 AMJoel Denke
02/12/2024, 9:18 AMJoel Denke
02/12/2024, 9:19 AM