Re: User time zone ignored in JDBC/PostgreSql

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: "Clifton B(dot) Sothoron Jr(dot)" <Clifton(dot)SothoronJr(at)logianalytics(dot)com>
Cc: "pgsql-interfaces(at)postgresql(dot)org" <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: User time zone ignored in JDBC/PostgreSql
Date: 2016-12-07 13:45:48
Message-ID: CADK3HHK03Z9bGZNtUH6wcDQCyjU_KqcT-jSzU=kGpnCrka3dnA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

This is actually an artifact of the JDBC spec which at the moment eludes
me, but IIRC the time defaults to the time of the server running the
application; not the server.

AFAIK we don't even look at the user timezone.

Not sure that helps

Dave Cramer

davec(at)postgresintl(dot)com
www.postgresintl.com

On 6 December 2016 at 10:50, Clifton B. Sothoron Jr. <
Clifton(dot)SothoronJr(at)logianalytics(dot)com> wrote:

> 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.
>
>
>

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Devart 2016-12-26 11:12:11 Support for PostgreSQL 9.5 and 9.6 in dbForge Data Compare for PostgreSQL
Previous Message Bob Nick 2016-12-07 09:56:08 help with pgsql_perl5-1.9.0