Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Issue on ojdbc 23.3.0.23.09 with LocalDate parameter

Iñaki PerezJan 9 2024

We have a DEMO table containing a TIMESTAMP column:

create table DEMO
(
  DEMO_TIMESTAMP TIMESTAMP
)

…and we execute an INSERT operation with a LocalDate parameter:

try (final PreparedStatement st = connection.prepareStatement("INSERT INTO DEMO (DEMO_TIMESTAMP) VALUES (?)")) {
  st.setObject(1, LocalDate.now());
  st.executeUpdate();
}

When inspecting the DEMO_TIMESTAMP column we get different values depending on the ojdbc11 version used:

  • Version 21.11.0.0 - Value: 2024-01-09 00:00:00.000000
  • Version 23.3.0.23.09 - Value 2024-01-09 12:00:00.000000

Could this be an issue?

Comments
Post Details
Added on Jan 9 2024
0 comments
142 views