User time zone ignored in JDBC/PostgreSql

From: "Clifton B(dot) Sothoron Jr(dot)" <Clifton(dot)SothoronJr(at)logianalytics(dot)com>
To: "pgsql-interfaces(at)postgresql(dot)org" <pgsql-interfaces(at)postgresql(dot)org>
Subject: User time zone ignored in JDBC/PostgreSql
Date: 2016-12-06 15:50:30
Message-ID: 6A395F497CE89A4693420F1134B3FDB896E4504D@LogiMail10.LogiXML.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

I've created a user with a time zone of America/Chicago and a server time zone of America/New York. I run the following query and America/New York is returned. The user time zone setting is ignored. It doesn't seem to be usable via JDBC.

select now(), extract(timezone FROM now()), current_setting('TIMEZONE'), now()-interval '1 hour' as "1HourAgo"

I don't see any documented PostgreSQL JDBC connection properties that cause the user time zone to be honored. Is there a way to via a JDBC connection to cause the user time zone to be used?

Thanks in advance,

Clifton Sothoron
Senior Programmer
Logi Analytics Inc.

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bob Nick 2016-12-07 09:56:08 help with pgsql_perl5-1.9.0
Previous Message Attila Peller 2016-10-07 01:23:47 cursor updatability changed