Problem with time settings

For about the past month, I’ve had trouble with the time. Whenever I reboot, the time will be off by several hours. I can reset it with Adjust Date & Time, but it will be wrong again when I reboot. I believe it is wrong if I just log out and back in, too. And even with it reset, things like email and chat rooms now show an incorrect time. Also, if I check “Set time and date automatically” it says it can’t connect, no matter which time server I choose. Or sometimes it doesn’t say anything but just grays out the checkbox, removing the check. My time zone is correct. I checked the time in my bios and that is also correct. This is becoming a real nuisance. What else can I do?
Netrunner 12.12

You could try running this terminal command

sudo dpkg-reconfigure tzdata

and try setting the correct timzeone there again.

If this does not help do you have a second system installed like windows for example ?

I have already tried that and it didn’t help. I don’t have Windows installed but I do have Linux Mint. The time is correct in Mint. It’s correct for about a minute in Netrunner, then it changes and is incorrect. The problem seems to be somewhere in Netrunner. Or what I mean is, Netrunner itself seems to be changing the time after it fully boots.

It sounds to me as if it greps the incorrect time from the net. Could you please disable automatic time configuration (the one in the clock settings)

If by disabling it you mean to just uncheck it, it is already unchecked. As I mentioned, it doesn’t work when it is checked and changes itself to grayed out and unchecked when I try. Is there another way to disable it?

You could try deleting the service by removing the ntpdate package.

I corrected the time again, removed the ntpdate package and rebooted. the clock went from 2:52 to 2:53 to 7:54. :frowning:
This really is a problem for me because none of my alarms go off at the proper time, anymore. Changing the time only seems to change it in the panel. Kalarm reminders don’t go off when they are supposed to and timestamps on email, chat rooms, and anywhere else a time is marked are all still wrong, even after adjusting the clock.

ETA: Well now it isn’t even holding the correct time on the panel until reboot. While I was typing the above reply, I saw it go from 3:13 to 8:14pm. Before removing ntpdate, it did hold the date until a reboot, if only on the panel.

Make sure that the package ntp is not installed and also there is no executable ntpq as it seems still to update the time via the internet.
To prove this you could try disconnecting your computer from the internet and see if the time change still occurs. If not than definitely some ntp service is still fetching it from the web.

Hello Leszek:
I have the same problem and found an useful information:

When I install and use “America/Montevideo” timezone everything goes fine, but after installation I was trying to enable option “Update time automatically” from “Date/Time settings” in KDE preferences.

I found, each time I try it. The time goes 3 hours more (UTC) and not UYT. (info from date command).
But most useful information, I found the KDE Preferences “Date/Time settings” changes /etc/localtime file to this link:
ls -l /etc/localtime
lrwxrwxrwx 2 root root 27 jul 5 12:25 /etc/localtime -> [color=#FF0000]…/posix/America/Montevideo[/color]

But that file doesn’t exist

So I have done it manually:
[color=#32CD32]sudo ln -sf /usr/share/zoneinfo/America/Montevideo /etc/localtime[/color]

That fixes the problem immediately, but If I try to use Date/time settings again, it changes /etc/localtime to wrong address again.

So problem could be related to KDE netrunner/kubuntu compilation. Or netrunner settings. I don’t really know, but I think this information will help to fix this issue.


This looks interesting. I must take a look at it before I can tell you more. But it could be an upstream issue maybe.

My time seems stable now after removing every instance of ntp that was installed but I hope Pablo’s information will help you fix the problem because I would really prefer my time to stay updated via the internet. I don’t have the problem with Mint on the same machine, but I’m not running KDE on Mint.

I think this problem was solved with KDE SC packages 4.10.4 . Can you please check if it works for you with the kubuntu backports ppa packages which ship 4.10.4 .
My initial test show that the time and date utility does not create a /etc/localtime anymore when it does not find the timezone in /usr/share/zoneinfo and cannot find the zic utility to compile the timezone. Otherwise it will just copy (not link) from /usr/share/zoneinfo/ to /etc/localtime.

Ok another update here as I experienced this issue again with 4.10.4 and 4.10.5. I found out that the kcm module is copying the /usr/share/zoneinfo/Region/City file to /etc/localtime. But this is wrong on debian based linux distributions, because those zoneinfo files there are nothing else but symlinks. And copying a symlink without an absolute path results in this error.
The fix would be trivial. Directly copy the original file instead of the symlink. But I need to take a look if its a general problem for KDE SC or if its distribution (this means all debian based distributions) problem.

Removing the ntp stuff only keeps rebooting from changing the time in my panel clock. Everything with a timestamp, such as emails and chat, are still showing incorrect time. I hope this does get fixed. Thanks, leszek, for looking into it.

Short update. Its definitely an debian/ubuntu based bug, as other distributions don’t use symlinks in /usr/share/zoneinfo . I already contacted the the kubuntu-devs and gave them a small patch that should fix the issue. I still need to contact the debian maintainers and see what they are up to.

Good to know, you have identified the root cause of the issue. As it affects all debian based distributions hope it could be solved in some way soon.

I will be able to make more tests if needed.
I have tried with 4.10.5 and have the same problem as you confirmed.

my email: pablodav at gmail dot com


It turns out to be a little bit more complicated as I initially thought. The debian and ubuntu flavors use the zic tool first to set the localtime and only falls back to manually copying the file from /usr/share/zoneinfo if zic is not found. As zic is part of the libc-bin it is normally on every debian/ubuntu based distro. But this makes it also a little hard to fix. So ideally zic needs to be fixed. Everything else would be a workaround. The Kubuntu devs are looking to a bugfixed zic version in 13.10 and it seems they won’t fix the issue for older versions. At least I don’t think they will integrate a workaround that ignores zic and links the files from /usr/share/zoneinfo directly.

So this will not be fixed in the current version of Netrunner? It has become a real problem for me as I can’t even use my calendar for scheduling appointments or my alarm for reminders. I think I am going to have to change distros. :frowning: Does it only affect KDE desktops? Because my Mint install, which is Ubuntu based, does not seem to have this problem.

It seems only to effect Debian based (including Ubuntu) distributions with KDE besides some which fixed that issue with the workaround described.

Yes on the same hardware with UTC hwclock no issue on openSuSE KDE. Actually any chance have a fix for that? I think shame have issue like this on modern distro for so long. It basic thing that working without troubles for years before. Also in Ubuntu Unity no problem at all. Why just not use their solution for that :huh: any way it ubuntu based.