Re: Java's set of timezone names

From: Vadim Nasardinov <vadimn(at)redhat(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Java's set of timezone names
Date: 2005-07-20 19:29:48
Message-ID: 200507201529.48152@vadim.nasardinov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Wednesday 20 July 2005 14:16, Vadim Nasardinov wrote:
> Sun's JDK's timezone info seems fairly different from what, say,
> Fedora Core distributes in its tzdata RPM:

More precisely, Sun's timezone info seems to be a strict subset of
Fedora's timezone info. (This is for Sun's JDK 1.4.2_08 and Fedora
Core 3. I didn't bother to check JDK 1.5.0 -- it does add three
additional timezones over what was present in 1.4.2: America/Bahia,
America/Campo_Grande, and America/Toronto.)

I added a couple of "grep -v" pipes to filter out irrelevant
differences:

| $ find /usr/local/j2sdk1.4.2_08/jre/lib/zi -type f -printf '%P\n' | \
| grep -v ZoneInfoMappings | sort > /tmp/java-tzdata.txt
| $ find /usr/share/zoneinfo/ -type f -printf '%P\n' | \
| grep -v right/ | grep -vE '(right/|posix/|zone\.tab)' | \
| sort > /tmp/linux-tzdata.txt

This shows that the FC3 tzdata is a strict superset of the JDK 1.4.2
timezone info:

| $ diff /tmp/java-tzdata.txt /tmp/linux-tzdata.txt | grep -c '>'
| 152
| $ diff /tmp/java-tzdata.txt /tmp/linux-tzdata.txt | grep -c '<'
| 0

Whether or not this means that PostgreSQL on FC should be able to
handle any time zone that Java throws at it, I am not sure.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2005-07-20 19:42:45 Re: Java's set of timezone names
Previous Message John R Pierce 2005-07-20 19:21:52 Re: Timestamp Conversion Woes Redux