Skip to content

Commit

Permalink
JavaLocalDateTimeColumnType not setting nanoseconds correctly on Time…
Browse files Browse the repository at this point in the history
…stamp #793
  • Loading branch information
Tapac committed Feb 13, 2020
1 parent 6b46eb0 commit f95c040
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f95c040

Please sign in to comment.