https://kotlinlang.org logo
#kotlinx-datetime
Title
# kotlinx-datetime
j

jeggy

02/21/2023, 12:25 PM
Is there any way to provide a custom toString pattern? I have
LocalDateTime
which I want to serialize with
yyyy-MM-dd HH:mm:ss
.
d

Dmitry Khalanskiy [JB]

02/21/2023, 12:39 PM
Not at the moment, working on it right now. But this format is simple enough, you just can do
localDateTime.toString().replace("T", " ")
.
j

jeggy

02/21/2023, 12:40 PM
Is there a YouTrack issue on this, so I can subscribe to progress?
d

Dmitry Khalanskiy [JB]

02/21/2023, 12:41 PM
We use Github for the
kotlinx-datetime
issue tracker. There are many issues regarding this, choose whichever you like! https://github.com/Kotlin/kotlinx-datetime/issues?q=is%3Aissue+is%3Aopen+label%3Aformatters
j

jeggy

02/21/2023, 12:41 PM
Nice, thanks 🙂
I will just use the
.replace
for now 👍
13 Views