From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | George Woodring <george(dot)woodring(at)iglass(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: SQL solution for my JDBC timezone issue |
Date: | 2015-02-23 20:32:31 |
Message-ID: | CADK3HHL-5YnbyHb5SVQExZ0pj9XT1fVJr06fjitU234Wh3w3+w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-jdbc |
George,
Everytime you get a connection the driver will issue set timezone ...
It does not change the default time zone for the server (AFAICS)
Dave Cramer
dave.cramer(at)credativ(dot)ca
http://www.credativ.ca
On 23 February 2015 at 15:29, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:
> On 02/23/2015 12:15 PM, George Woodring wrote:
>
>> This is what I was looking for, however the JDBC does something to make
>> its timezone the default.
>>
>> My cluster is set to GMT, I have a DB that is set to US/Pacific, when I
>> get the connection from JDBC it is US/Eastern. The reset command does
>> not affect it. I can set timezone in the code to 'US/Pacific" and I see
>> it change, when I do another RESET timezone it goes back to US/Eastern.
>>
>
> In your original post you mentioned that access to the databases is
> through a Web server.
>
> Is there just one Web server with one time zone?
>
>
>> Thanks,
>> George Woodring
>>
>> iGLASS Networks
>> www.iglass.net <http://www.iglass.net>
>>
>> On Mon, Feb 23, 2015 at 10:49 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
>> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>> wrote:
>>
>> George Woodring <george(dot)woodring(at)iglass(dot)net
>> <mailto:george(dot)woodring(at)iglass(dot)net>> writes:
>> > Yes, that is where we think we are heading, the issue is that the
>> code does
>> > not know what it needs to be set back to. We have 90 databases
>> with 5
>> > different time zones. I was just hoping for a more elegant
>> solution than
>> > writing a lookup table that says if you are connecting to db x then
>> set to
>> > timezone y.
>>
>> "RESET timezone" ?
>>
>> regards, tom lane
>>
>>
>>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>
From | Date | Subject | |
---|---|---|---|
Next Message | Luca Ferrari | 2015-02-23 20:36:36 | Re: 9.3.5 failing to compile with dtrace on FreeBSD 10.1 |
Previous Message | Adrian Klaver | 2015-02-23 20:29:28 | Re: SQL solution for my JDBC timezone issue |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-02-23 21:31:28 | Re: SQL solution for my JDBC timezone issue |
Previous Message | Adrian Klaver | 2015-02-23 20:29:28 | Re: SQL solution for my JDBC timezone issue |