Fix for JdbcOneTimeTokenService cleanupExpiredTokens failing with PostgreSQL

Closes gh-16344
This commit is contained in:
Toshiaki Maki 2024-12-26 03:41:16 +09:00 committed by Rob Winch
parent b9b29edbeb
commit 5075869418

View File

@ -190,7 +190,8 @@ public final class JdbcOneTimeTokenService implements OneTimeTokenService, Dispo
}
public void cleanupExpiredTokens() {
List<SqlParameterValue> parameters = List.of(new SqlParameterValue(Types.TIMESTAMP, Instant.now()));
List<SqlParameterValue> parameters = List
.of(new SqlParameterValue(Types.TIMESTAMP, Timestamp.from(Instant.now())));
PreparedStatementSetter pss = new ArgumentPreparedStatementSetter(parameters.toArray());
int deletedCount = this.jdbcOperations.update(DELETE_ONE_TIME_TOKENS_BY_EXPIRY_TIME_QUERY, pss);
if (this.logger.isDebugEnabled()) {