https://kotlinlang.org logo
#confetti
Title
# confetti
j

John O'Reilly

03/01/2024, 3:24 PM
New kotlinx-datetime version include formatting updates which means we can avoid some of the expect/actual stuff we have right now https://github.com/joreilly/Confetti/pull/1159
💪 1
🦜 1
we still have this that we have expect/actual for....need to check again how/where this is used to see if we still need that
Copy code
interface DateService {
    fun now(): LocalDateTime
}
s

Stylianos Gakis

03/01/2024, 8:58 PM
I know that Clock.System.now() exists, but that gives back an Instant I think? Is that the issue with using that instead? If yes the way that LocalDateTime is fetched right now probably makes some assumptions for the timezone. Maybe we can simply make the same assumptions while turning that Instant into a LocalDateTime so the functionality is the same but without the expect actual?
j

John O'Reilly

03/01/2024, 8:59 PM
Yeah, I think there was something here about needing the time zone but haven't really looked closely at that code