So far I have no explanation but to say that many people have reported JDBC problems and violations with the latest generations of Oracle drivers, I can say that you are abusing these classes. And the best classes are available.
java.sql.Date - date only
You have chosen the wrong class on the Java side. While the java.sql.Date class does have a time set to 00:00:00 in UTC inside its internal part, you should ignore this fact, as it is instructed in the class documentation. java.sql.Date is for date values with no time and no time zone.
This class is poor design, bad hack inheriting from java.util.Date , while you should ignore this fact of inheritance.
java.sql.Timestamp - date and time
java.sql.Timestamp is the type you need in your case, not java.sql.Date . (But read on for an even better class.)
The whole set of old time classes with the earliest versions of Java was a bold industry - the first attempt to solve the problem of processing data on a date, but they did not materialize. They are poorly designed, confused and troublesome. Avoid them: java.util.Date , java.util.Calendar , java.util.GregorianCalendar , java.text.DateFormat , java.text.SimpleDateFormat . And if possible, avoid java.sql types as well. Use java.time classes instead.
JDBC 4.2
As with JDBC 4.2, your JDBC driver can have direct access to java.time types from your database. The PreparedStatement::setObject and ResultSet::getObject can display your date and time values ββfrom the database as java.time objects.
Instant instant = myResultSet.getObject( 1 );
... or maybe ...
Instant instant = myResultSet.getObject( 1 , Instant.class );
If your driver is not so functional, then briefly convert it to java.sql types and immediately convert it to java.time yourself. Do all your business logic with java.time. Refer to java.sql types only for data exchange with the database. To convert to / from java.time, find new methods added to the old classes. For example, java.sql.Timestamp::toInstant .
Here we extract java.sql.Timestamp from the ResultSet and immediately convert it to Instant . You can do this on two lines instead of one combo line for debugging purposes.
Instant instant = myResultSet.getTimestamp( 1 ).toInstant();