The Vertica Forum is getting a makeover! The site will be undergoing maintenance from Tuesday 8/13 to Friday 8/16. We appreciate your patience and cooperation during this time.

timestamptz time is off by one hour

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

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.