Knute Johnson wrote:
David Karr wrote:
Linux has all sorts of issues with timezones and so does Java. So if
your system is not completely updated, both the Linux and Java, there
could be timezone problems. And that means the _?? updates of Java
too.
That said, you can do an immediate fix by putting adding a link,
/etc/localtime that points to /usr/share/zoneinfo/US/Pacific
Ok, that worked. Can you please explain how that works (especially
the part about the two original files being identical)? I'd like to
add some info to the Ubuntu bug report.
Sun's Java under Linux requires that /etc/localtime be a link. I have
no idea why. I can't tell you how long it took me to figure this out.
Last time I checked, that was related to Java's need to detect what
timezone, and not what timezone rules, the system is configured to use.
The content of the files in /usr/share/zoneinfo, indicate a few rules
about the timezone, but it does not identify the timezone (and it lacks
DST information.) So Sun Java decided to identify it by the file's name.
Since, by definition, the file name is /etc/localtime, the idea was to
check what file it is a link to.
Now for the tricky part: in case /etc/localtime is not a link, the
fallback was to check all entries in /usr/share/zoneinfo, to find an
identical file, and decide this file's name indicates the timezone. A
problem I often encountered, was that several files were identical to
/etc/localtime, and Java would pick the wrong one.
But, I use the past because that would lead to incorrect timezone
detection, and here it seems that PST was detected just fine, the
problem being with DST rules. No idea what leaded to this precise problem.
If anyone has more up-to-date knowledge with the issue, I'd be delighted
to hear about it.