JavaLocalDateTimeColumnType not setting nanoseconds correctly on Timestamp #793

This commit is contained in:
Andrey.Tarashevskiy
2020-02-13 17:00:42 +03:00
parent 6b46eb033c
commit f95c040ee6

View File

@@ -93,7 +93,7 @@ class JavaLocalDateTimeColumnType : ColumnType(), IDateColumnType {
override fun notNullValueToDB(value: Any): Any {
if (value is LocalDateTime) {
return java.sql.Timestamp(value.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli())
return java.sql.Timestamp.from(value.atZone(ZoneId.systemDefault()).toInstant())
}
return value
}