mirror of
https://github.com/jlengrand/Exposed.git
synced 2026-03-10 08:11:20 +00:00
JavaLocalDateTimeColumnType not setting nanoseconds correctly on Timestamp #793
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user