We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


timestamptz time is off by one hour — Vertica Forum

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