I’m running OpenSuse 10.3 and KDE, and I was using NTP to set the system time and had no problems. Now once I log in to the desktop, the taskbar clock will be off by days, not just hours. Example: booted @ 1700 local, June 30, 2008. The clock showed July 2 @ around 0900. The only thing right is the timezone.
The RTC on the motherboard is fine, and set to local time. I’ve tried booting with and without NTP, and the clock still comes up set wrong. The option about RTC set to local time is set.
This shows up in both KDE and XFCE desktops, so I think there’s a config file messed up. The only question is where are those files?
The system time is independent frrom the desktopo manager you use (or not). To prove this you can log in in the real console (Ctrl-Alt-F1) as root and type the commands **date **and time.
When these are also wrong you will understand that there is no additional configuring in KDE. When not … Post it!
In YaST > Network Services > NTP Configuration you see your NTP server and a testbutton. You can test if this NTP server is still alive.
Shutdown the Linux system, now the system clock is set to either local time (when you also have another bootable OS on the system that needs this) or zero time.
The system is switched of, but the clock runs on feeded from the CMOS battery.
The system is switched on and still has the right time (not exactly, depends on the hardware clock’s accuracy and the status of the battery).
The OS (Linux) reads the time from the system and adjusts acording to its knowledge of it being local or zero.
The system corrects with the time got from the NTP server (which it will do at intevals during the lifetime of the OS session).
Whn the clock is off by days and with different amounts every time you boot, the conclusion is normaly:
Your CMOS battery is dying, replace it.
NTP is not correcting this, so there is something wrong there.
Thanks for the reply, hcvv. The reminder of the normal time setting process helps a lot.
Did some looking around in the system when I got up this afternoon (I work nights, and was worthless this morning! )
I found that the CMOS RTC was off this time. First time its happened, so tested the battery and its good. Reset the rtc, the booted as usual. The system clock was showing August 2, 2008 @ 13xx hours (when local was 19:3x or so.)
This is aggravating. I booted into Windows XP after checking that the rtc was still set properly and all was fine. So now its time to check a couple of other things and reboot as see what happens this time.
After 2 re-boots, the system time is finally correct again. For anyone else who might have this happen, part of the answer I found on another site is the /etc/adjtime file.
While system is running, set the system time correctly. Verify with the date command in a console.
A) Delete the /etc/adjtime file. No worries - it gets recreated on the next boot.
B) Check your /etc/ntp.conf file and make sure the servers are listed correctly, and fix if needed. There were errors in mine.
Reboot the machine. Get into the CMOS and check and adjust the RTC if needed. Save changes and exit the CMOS setup.
Let the boot cycle continue, and when Linux comes up the system time should have been set correctly.
No guarantees, but this is what fixed the system for me. Hope this helps someone else!
The file /etc/adjtime has been the culprit in several time-related issues I’ve had. Deleting it (it is recreated at boot) is always a good place to start.