(I hit the wrong reply button, sorry - sending again to all included,
including Debian's bug tracker)

Hi Stephen,
The Debian release is 4.0 - Debian Etch. The timezone data version in
this release, as far as I can tell, is 2007b (I suppose that is what
you call an Olson dataset - I am not an expert in these things :-) )

Let me summarize the problem, as I understand it. Since I made the bug
report I have examined the JDK5 and 6 sources and confirmed the
problem more precisely.

*  JDK5 and JDK6 (the problem is present in both, I don't know about
earlier versions) detect the system timezone by relying on
"/etc/localtime" being a symbolic link. For example, if
"/etc/localtime" points to "/usr/share/zoneinfo/US/Pacific", then the
zone ID is "US/Pacific"

* In Debian Etch (and I suppose other distributions) "/etc/localtime"
is not a link. If you are interested in the motivation for this
change, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=346342 .

* When /etc/localtime is not a link, the library falls back to binary
comparison of all files under "/usr/local/share/zoneinfo" against
"/etc/localtime". It will find the first file which has the same
contents as /etc/localtime, although it may not necessarily be the
currently selected timezone. In this case it finds "SystemV/PST8PDT"
before "US/Pacific".

* In Debian based distributions the correct way to determine the
system timezone is by reading "/etc/timezone". It is a test that can
easily be added implemented before falling back to binary comparison.
I can provide a patch if necessary - the code is really simple.

* Finally, the definitions of "SystemV/PST8PDT" in Debian and JDK5 (I
haven't checked JDK6) are different. So, when using "SystemV/PST8PDT"
as a default timezone, Java displays the localtime incorrectly. I
don't know whose definition of "SystemV/PST8PDT" is correct, but that
doesn't really matter because the system timezone is not set to
"SystemV/PST8PDT".

Hope this helps. Please, let me know if you have any questions.

regards,
Tzvetan


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to