Time Setting Problem in 10.3 & KDE

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?

Thanks for any help. :slight_smile:

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.

The NTP servers were all live during testing. I’ll try the console stuff you recommended once I get home, as I’m at work right now.

Normal behaviour should be:

  1. Time is allright (by what means).
  2. 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.
  3. The system is switched of, but the clock runs on feeded from the CMOS battery.
  4. 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).
  5. The OS (Linux) reads the time from the system and adjusts acording to its knowledge of it being local or zero.
  6. 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:

  1. Your CMOS battery is dying, replace it.
  2. NTP is not correcting this, so there is something wrong there.

Something reads the hardware clock at startup and writes it at shutdown AFAICT from looking at the console (hit F2).

Try disabling and re-enabling ntp in the system runlevels section of YaST. It ensures some other stuff is running, that might be what you are missing.

Sorry to be vague, in a rush.

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! :slight_smile: )

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.

Thank you for your help!

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.

  1. While system is running, set the system time correctly. Verify with the date command in a console.

  2. 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.

  3. Reboot the machine. Get into the CMOS and check and adjust the RTC if needed. Save changes and exit the CMOS setup.

  4. 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.