SackCastellon
05/10/2018, 10:41 PMjava.time.LocalDateTime
to org.joda.time.DateTime
and back, so far I have created this extensions which seem to work fine:
fun java.time.LocalDateTime.toJoda(): org.joda.time.DateTime = DateTime(this.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli())
fun org.joda.time.DateTime.toJava(): java.time.LocalDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(this.millis), ZoneId.systemDefault())
The LocalDateTime is used by JavaFX's DatePicker, and the DateTime is used by Exposed.
Any comments or suggestions?araqnid
05/11/2018, 8:56 PM