When selecting dates, the java.sql.Date's millisecond part is not correctly reset to zero. Here is a quick example to reproduce the issue:
---------------------------------------------
Connection connection = create().getConnection();
for (int i = 0; i 10; i++) {
ResultSet rs = connection.createStatement().executeQuery(select date '2000-01-01');
rs.next();
System.out.println(rs.getDate(1).getTime());
rs.close();
Thread.sleep(150);
}
---------------------------------------------
The above prints on my machine (CET)
---------------------------------------------
946681200680
946681200838
946681200992
946681200144
946681200298
946681200480
946681200634
946681200787
946681200940
946681200093
}}}
---------------------------------------------