Java and timezone issues!
David M. Karr
davidmichaelkarr at gmail.com
Sat Apr 18 18:19:02 UTC 2009
Knute Johnson wrote:
> Somebody posted on comp.lang.java the other day about problems with
> Ubuntu and Java timezones not reflecting daylight savings times
> accurately. I don't want to rehash that discussion but the question was
> asked here the other day, what update messes with the /etc/localtime
> file. It is tzdata that came in today's updates. It rewrites the link
> at /etc/localtime that points to /usr/share/zoneinfo/??? to be a file.
> This stops Java from figuring out the timezone correctly.
The two packages that got installed this morning were "tzdata" and
"tzdata-java", one of which (or the installation process itself) changed
/etc/localtime from a link to a hard file. What's odd is that the
"installed files list" for either package does not list
"/etc/localtime". However, I suppose if something tried to replace the
file that "/etc/localtime" was symlinked to, the process of doing that
might leave "/etc/localtime" as a plain copy of the original
symlinked-to file. The "tzdata" package had
"/usr/share/zoneinfo/US/Pacific" in its installed files list, which is
the file /etc/localtime is supposed to be symlinked to.
If I'm guessing correctly about what happens when a file is moved on top
of a file that is symlinked-to, then changing /etc/localtime from a
symlink to a plain file may be completely inadvertent.
More information about the ubuntu-users