From: Adrian Klaver <adrian.klaver@aklaver.com>
To: David Wall <d.wall@computer.org>
To: pgsql-general@postgresql.org
To: pgsql-jdbc@postgresql.org
Subject: Re: [GENERAL] Upgrading from PG 8.3.3 to 9.3.4 - FATAL: invalid value for parameter "TimeZone": "PST"
Date: Sun, 01 Jun 2014 12:54:20 -0700
Message-ID: <538B84EC.6030207@aklaver.com> (raw)
In-Reply-To: <538B7404.7080601@computer.org>
References: <538ACAFE.1050404@computer.org>
<538ACC7D.9050302@hogranch.com>
<538AD2C7.6080107@yozons.com>
<538AD36A.3010002@computer.org>
<538B4F3B.5070006@aklaver.com>
<538B7404.7080601@computer.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
On 06/01/2014 11:42 AM, David Wall wrote:
>
> On 6/1/2014 9:05 AM, Adrian Klaver wrote:
>> The JDBC code above, if I am following correctly, is picking up a
>> default timezone of 'PST' and then in the first if returning that as
>> the tz value to SET TimeZone in the startup packet.
>>
>> Two things.
>>
>> 1) Where is it getting PST from ?
>>
>> 2) Should the driver even be returning an abbreviation given that
>> Postgres will not accept it as a TimeZone value?
>>
>
>
> Thanks for the extra help, Adrian.
>
> It led me to investigate the 35 webapps we deploy on Tomcat and I found
> 2 rogue apps that set their timezone to "PST". Once I fixed these two,
> all is working great again.
>
> I guess there's no bug, per se, except in our configuration. Once we
> changed it to PST8PDT, all was good again.
Not so much a bug as a misplaced error. Given that TimeZone does not
accept abbreviations, it would seem that JDBC code should throw an
exception at that point. It would not change the end result, but make it
easier to determine where the error is occurring. In the long run it may
be moot though, because of this:
http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html
Three-letter time zone IDs
For compatibility with JDK 1.1.x, some other three-letter time zone IDs
(such as "PST", "CTT", "AST") are also supported. However, their use is
deprecated because the same abbreviation is often used for multiple time
zones (for example, "CST" could be U.S. "Central Standard Time" and
"China Standard Time"), and the Java platform can then only recognize
one of them.
>
> Thanks,
> David
>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: adrian.klaver@aklaver.com, d.wall@computer.org, pgsql-general@postgresql.org
Subject: Re: [GENERAL] Upgrading from PG 8.3.3 to 9.3.4 - FATAL: invalid value for parameter "TimeZone": "PST"
In-Reply-To: <538B84EC.6030207@aklaver.com>
References: <538ACAFE.1050404@computer.org> <538ACC7D.9050302@hogranch.com> <538AD2C7.6080107@yozons.com> <538AD36A.3010002@computer.org> <538B4F3B.5070006@aklaver.com> <538B7404.7080601@computer.org> <538B84EC.6030207@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox