pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux)
3+ messages / 3 participants
[nested] [flat]

* Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux)
@ 2005-07-20 18:16 Vadim Nasardinov <vadimn@redhat.com>
  2005-07-20 18:29 ` Re: Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux) Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Vadim Nasardinov @ 2005-07-20 18:16 UTC (permalink / raw)
  To: pgsql-jdbc

On Wednesday 20 July 2005 13:41, Tom Lane wrote:
> Hmm ... does Java have a standard set of timezone names?  If so,
> does it bear any resemblance to the zic database names?

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/

Sun's JDK puts timezone data in $JAVA_HOME/jre/lib/zi/

Sun's JDK's timezone info seems fairly different from what, say,
Fedora Core distributes in its tzdata RPM:

 | $ find /usr/share/zoneinfo/ -type f -printf '%P\n' | sort > /tmp/linux-tzdata.txt 
 | $ find /usr/local/j2sdk1.4.2_08/jre/lib/zi -type f -printf '%P\n' | sort > /tmp/java-tzdata.txt 
 | $ diff /tmp/linux-tzdata.txt /tmp/java-tzdata.txt  | wc -l
 | 1309



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux)
  2005-07-20 18:16 Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux) Vadim Nasardinov <vadimn@redhat.com>
@ 2005-07-20 18:29 ` Tom Lane <tgl@sss.pgh.pa.us>
  2005-07-20 18:57   ` Re: Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux) Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2005-07-20 18:29 UTC (permalink / raw)
  To: Vadim Nasardinov <vadimn@redhat.com>; +Cc: pgsql-jdbc

Vadim Nasardinov <vadimn@redhat.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.

> 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux)
  2005-07-20 18:16 Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux) Vadim Nasardinov <vadimn@redhat.com>
  2005-07-20 18:29 ` Re: Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux) Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-07-20 18:57   ` Dave Cramer <pg@fastcrypt.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Dave Cramer @ 2005-07-20 18:57 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Vadim Nasardinov <vadimn@redhat.com>; pgsql-jdbc


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

> Vadim Nasardinov <vadimn@redhat.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
>
>




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-07-20 18:57 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-07-20 18:16 Java's set of timezone names (was: Re: Timestamp Conversion Woes Redux) Vadim Nasardinov <vadimn@redhat.com>
2005-07-20 18:29 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-07-20 18:57   ` Dave Cramer <pg@fastcrypt.com>

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