public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dave Cramer <[email protected]>
To: Clifton B. Sothoron Jr. <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: User time zone ignored in JDBC/PostgreSql
Date: Wed, 7 Dec 2016 08:45:48 -0500
Message-ID: <CADK3HHK03Z9bGZNtUH6wcDQCyjU_KqcT-jSzU=kGpnCrka3dnA@mail.gmail.com> (raw)
In-Reply-To: <6A395F497CE89A4693420F1134B3FDB896E4504D@LogiMail10.LogiXML.local>
References: <6A395F497CE89A4693420F1134B3FDB896E4504D@LogiMail10.LogiXML.local>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgsql-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

[email protected]
www.postgresintl.com

On 6 December 2016 at 10:50, Clifton B. Sothoron Jr. <
[email protected]> 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.
>
>
>


view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: User time zone ignored in JDBC/PostgreSql
  In-Reply-To: <CADK3HHK03Z9bGZNtUH6wcDQCyjU_KqcT-jSzU=kGpnCrka3dnA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox