/etc/localtime not a link

8,149

Solution 1

You should reconfigure the tzdata package to set /etc/localtime (dpkg-reconfigure tzdata). It used to be the case that /etc/localtime was a symbolic link (before Debian etch, so around 8.04?). It no longer is, and I can't find anything in the changelogs of the last release listed in the Packages index (10.04).

Solution 2

Reported and fixed.

  • package systemd - 218-5ubuntu1

https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1409594

Share:
8,149

Related videos on Youtube

user367890
Author by

user367890

Updated on September 18, 2022

Comments

  • user367890
    user367890 over 1 year

    Rather fresh install of Ubuntu 14.10. Have installed Gnome Flahsback which I am currently using. Have updated Date/Time to show Day MM DD HH:MM:SS. That's about it.

    Due to another issue I checked dmesg and found the following:

    systemd-timedated[25780]: /etc/localtime should be a symbolic link to a
                              timezone data file in /usr/share/zoneinfo/.
    

    Checking it out, it is a regular file and not a link.

    $ la /etc/localtime
    -rw-r--r-- 1 root root 2.2K Jan 11 14:18 /etc/localtime
    

    Further there is a link in /usr/share/zoneinfo/ as:

    $ la /usr/share/zoneinfo/localtime
    lrwxrwxrwx 1 root root 14 Oct 23 01:47 /usr/share/zoneinfo/localtime -> /etc/localtime
    

    The localtime manual states:

    […] Because the timezone identifier is extracted from the symlink target name of /etc/localtime, this file may not be a normal file or hardlink.[…]

    and should typically be e.g.:

    /etc/localtime -> /usr/share/zoneinfo/Europe/Vatican
    

    Would it be OK to manually fix? As remove the file in /etc and add a link. Any implications?

    Have not noticed this on older versions, but a quick check on a previous install, believe it to be 12.10 (only mounted root from an old HDD), has the same issue. Is this perhaps an Ubuntu or Debian hack of some sort?

  • muru
    muru over 9 years
    @user367890 In that form, may not means should not, you're right. But the assumption behind that statement (/etc/localtime being a link) is not true, so that statement is not relevant.
  • user367890
    user367890 over 9 years
    So the answer is to let it be and ignore the log message :), Do not like it but that is the way it is I guess.
  • muru
    muru over 9 years
    @user367890 The message is because of systemd-timedated (if you check, we didn't even have a localtime manpage before 14.10). So the right thing to do will be filing a bug on Launchpad, presumably the systemd package, that this message is pointless on Ubuntu systems.