Java and timezone issues!
derek at pointerstop.ca
Mon Apr 20 14:07:55 UTC 2009
David M. Karr wrote:
> 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
It's not odd - I explained it in my first post to this thread, and I thought
you'd read it, since you responded.
> 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.
It's _not_ supposed to be symlinked.
> 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.
Try it. You replace the destination file, not the link. That's why I
suggested it could be very bad for you to replace a file that _should_ be a
real file with a symlink.
$ echo first >/tmp/test.txt
$ ln /tmp/test.txt /tmp/test2.txt -s
$ echo second >/tmp/test2.txt
$ ls -l /tmp/test*
lrwxrwxrwx 1 derek derek 13 2009-04-20 11:05 /tmp/test2.txt -> /tmp/test.txt
-rw-r--r-- 1 derek derek 7 2009-04-20 11:05 /tmp/test.txt
$ cat /tmp/test.txt
More information about the ubuntu-users