Skip to content

Commit

Permalink
[SHIBUI-2249]
Browse files Browse the repository at this point in the history
truncate time to millis
  • Loading branch information
jj committed Nov 2, 2021
1 parent aa95694 commit 4eb8c02
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit;

import javax.persistence.Column;
import javax.persistence.EntityListeners;
Expand Down Expand Up @@ -130,6 +131,7 @@ private static ZonedDateTime toZonedDateTime(LocalDateTime localDateTime) {
.atZone(ZoneId.systemDefault())
.toInstant()
.atOffset(ZoneOffset.UTC)
.toZonedDateTime();
.toZonedDateTime()
.truncatedTo(ChronoUnit.MILLIS);
}
}
}

0 comments on commit 4eb8c02

Please sign in to comment.