Before writing a Java Date to an SQL TIMESTAMP column, does JDBC translate the date from the Java virtual machine time zone to that of the database session?
For example, suppose the Java virtual machine time zone is UTC and the database session time zone is UTC-5. If a Java program attempts to store 2000-01-01 00:00:00
by passing it to PreparedStatement#setTimestamp(int, Timestamp)
, according to the JDBC standard, will the database store TIMESTAMP '2000-01-01 00:00:00'
or TIMESTAMP '1999-12-31 19:00:00'
?