Skip to content

Commit

Permalink
fix timestamp type to use microseconds instead
Browse files Browse the repository at this point in the history
  • Loading branch information
yyanyy committed Dec 16, 2020
1 parent 55b1e5b commit c0c758d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public long getLong(int ordinal) {
if (longVal instanceof Long) {
return (long) longVal;
} else if (longVal instanceof OffsetDateTime) {
return TimeUnit.SECONDS.toDays(((OffsetDateTime) longVal).toEpochSecond());
return Duration.between(Instant.EPOCH, (OffsetDateTime) longVal).toNanos() / 1000;
} else if (longVal instanceof LocalDate) {
return ((LocalDate) longVal).toEpochDay();
} else {
Expand Down

0 comments on commit c0c758d

Please sign in to comment.