X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5655852AB7 for ; Wed, 20 Jul 2005 15:57:49 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39627-10 for ; Wed, 20 Jul 2005 18:57:47 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 9E2D052AB1 for ; Wed, 20 Jul 2005 15:57:45 -0300 (ADT) Received: (qmail 29571 invoked from network); 20 Jul 2005 18:57:46 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 20 Jul 2005 18:57:46 -0000 In-Reply-To: <24445.1121884188@sss.pgh.pa.us> References: <90876a9e05071810503606d431@mail.gmail.com> <24020.1121881295@sss.pgh.pa.us> <200507201416.37925@vadim.nasardinov> <24445.1121884188@sss.pgh.pa.us> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: Vadim Nasardinov , pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux) Date: Wed, 20 Jul 2005 14:57:42 -0400 To: Tom Lane X-Mailer: Apple Mail (2.733) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.016 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/191 X-Sequence-Number: 13339 On 20-Jul-05, at 2:29 PM, Tom Lane wrote: > Vadim Nasardinov writes: > >> I'm not sure how Roedy Green knows this, but this is what he has to >> say on the subject in his Java Glossary: >> > > >> http://www.mindprod.com/jgloss/timezone.html >> > > >> The names for timezones used in Java comes from a list maintained >> at NIH by Arthur David Olson. For reasons only he understands, >> Pacific Standard Time is called America/Los_Angeles. >> > > >> As far as I can tell, Olson's timezone data can be found here: >> ftp://elsie.nci.nih.gov/pub/ >> > > Hmm ... that is the zic distribution, so if this information is > accurate > there should be a pretty exact match in the sets of names ... which it > sounds like there is not. On my Mac my java timezone was set to Canada/Montreal which was broken (did not use DST ) and the server certainly doesn't understand it. The server on the same machine had the timezone set to Canada/Eastern which java understands and I hacked the driver code to use the server timezone. This seems to work. There's still a fair bit of ambiguity as to whether java will do the right thing with the server supplied time zones though? It appears that timestamp, date, calendar in java are all terribly implemented. I'm starting to see more and more why other DBMS implemented their own setTimestamptz. > > >> Sun's JDK's timezone info seems fairly different from what, say, >> Fedora Core distributes in its tzdata RPM: >> > > Fedora's info also comes from zic. > > regards, tom lane > > ---------------------------(end of > broadcast)--------------------------- > TIP 6: explain analyze is your friend > >