Re: Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux)

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Vadim Nasardinov <vadimn(at)redhat(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux)
Date: 2005-07-20 18:57:42
Message-ID: FDABE0AB-7954-453A-88ED-1F739CCED303@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


On 20-Jul-05, at 2:29 PM, Tom Lane wrote:

> Vadim Nasardinov <vadimn(at)redhat(dot)com> 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
>
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vadim Nasardinov 2005-07-20 18:58:39 Re: Timestamp Conversion Woes Redux
Previous Message Tom Lane 2005-07-20 18:29:48 Re: Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux)