Hello,
When I use JDBC to insert a value into a timestamptz column, the value is off by one hour:
The value inserted by Java program is 2019-05-01 10:00:00
But the value in database is shown as 2019-05-01 11:00:00+00
This only happens for the dates within daylight savings range. If I insert a date like 2019-01-01 10:00:00, the database shows correct value as 2019-01-01 10:00:00+00
The Vertica database server timezone is UTC
I am running my java test program in my local time zone of EST5EDT. If I force my java program to run in GMT timezone -Duser.timezone=GMT, then the problem is gone.
Is this a bug related to Vertica JDBC driver?
As a comparison, I also tried Postgres DB with same testing program but no such issue exists.
Any help?
Thanks
Bin
timestamptz time is off by one hour
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.