Skip to content

Commit

Permalink
Fix bug for value==null
Browse files Browse the repository at this point in the history
  • Loading branch information
kagkarlsson committed Jan 30, 2024
1 parent 045c3a1 commit 64c18e3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ public DefaultJdbcCustomization(boolean persistTimestampInUTC) {
public void setInstant(PreparedStatement p, int index, Instant value) throws SQLException {
if (value == null) {
p.setTimestamp(index, null);
return;
}

if (persistTimestampInUTC) {
p.setTimestamp(index, value != null ? Timestamp.from(value) : null, UTC);
p.setTimestamp(index, Timestamp.from(value), UTC);
} else {
p.setTimestamp(index, value != null ? Timestamp.from(value) : null);
p.setTimestamp(index, Timestamp.from(value));
}
}

Expand Down

0 comments on commit 64c18e3

Please sign in to comment.