Hi, I need some help with date conversion. I have a datetime in MySql and I want to read it with my API made in exposed.
The Table has a column as follows:
val endTime = datetime("end_time")
and the data class has
val endTime: LocalDateTime?
in my DAOFacadeImpl class I perform the mapping between row and object as follows:
endTime = row[Events.endTime].toString().toLocalDateTime(),
but I have the following exception:
kotlinx.datetime.DateTimeFormatException: java.time.format.DateTimeParseException: Text '2014-01-26T17:30:00.000+01:00' could not be parsed, unparsed text found at index 23
I'm using kotlinx.datetime because it supports the object Serialization.
I suppose that the date read from database is not in ISO format (in the database I do not have the +01:00), but how to change its format to be an ISO format?
Any suggestion about?
thanks all