You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the modern databases (all of them?) support both timestamp and timestamp with time zone.
In that regard, setTimestamp(..., java.sql.Timestamp) becomes ambiguous, and the driver has to guess if the user meant with or without timezone.
I suggest the applications should use java.time APIs, then the JDBC driver would get a clear view on the intention of the user.
For instance:
java.time.LocalDate -> date
java.time.LocalTime -> time
java.time.LocalDateTime -> timestamp
java.time.OffsetDateTime -> timestamp with time zone
PS. I'm https://github.com/pgjdbc/pgjdbc co-maintainer, and I contributed to time-related tests and bugfixes. Frankly, I believe JDBC java.sql. time-related types are error-prone.