Mailinglist Archive: opensuse (4348 mails)

< Previous Next >
Re: [SLE] set system time ???
  • From: "Carlos E. R." <robin1.listas@xxxxxxxxxx>
  • Date: Wed, 2 Oct 2002 20:52:23 +0200 (CEST)
  • Message-id: <Pine.LNX.4.33.0210021959220.2047-100000@xxxxxxxxxxxxxxxx>

Ah, your version is a bit older than mine, I have suse 7.3.

Thankyou for the update. I still have one question, however: which
command is showing the wrong time? I think that you said that Yast
corrected the time, but is was bad again when reboots, correct?

To your question [a]:

- It should read the CMOS clock and update system clock inside the script
/etc/init.d/boot (miine does). Perhaps in your case the script got
corrupted, replace with the original from aaa_base.rpm (check first).
Maybe you could post here the relevant section.

- The file holding the relation between local and utc time is
"/etc/localtime". This file is copied (in your case) from
"/usr/share/zoneinfo/CST6CDT", I think. I assume CDT time is
"Global/CST6CDT" in yast?

I have just changed my local time to yours, in yast2. Now date command

nimrodel:~ # date
Wed Oct 2 13:08:53 CDT 2002
nimrodel:~ # date -u
Wed Oct 2 18:08:57 UTC 2002

I noticed one thing: yast1 says it will be active after rebooting. With
yast2 it is inmediate.

- Try this:

1) Make sure the "date" command shows time as "CDT", as above (even if
incorrect time, the CDT string must be present). If not, yast should
correct it; perhaps try a different localtime (there are probably more
than one with the same time difference).

2) Make sure you don't have a clock adjustement program or daemon like
netdate, or ntpdate, or xntp client (START_XNTPD="no" and
XNTPD_INITIAL_NTPDATE="" in /etc/rc.config). Stop the daemon if it
exists, so that it doesn't interfere. Delete or rename /etc/adjtime
(boot script in 7.3 recreates it, no problem).

3) Adjust to the correct localtime with "date -set" (not UTC).

4) Set the hwclock to the same time as the system, with "hwclock
--systohc" (not UTC, it should know how to manage).

6) Check with "date" and "hwclock --show". They should be the same

nimrodel:~ # date
Wed Oct 2 13:26:14 CDT 2002
nimrodel:~ # hwclock --show
Wed Oct 2 13:26:18 2002 -0.085997 seconds

7) Reboot to check. Keep fingers crossed 8-)

Carlos Robinson

El 02.10.01 a las 20:41, Michael D. Schleif escribió:

> Date: Tue, 01 Oct 2002 20:41:18 -0500
> From: Michael D. Schleif <mds@xxxxxxxxxxx>
> Cc: suse-linux-e List <suse-linux-e@xxxxxxxx>
> Subject: Re: [SLE] set system time ???
> <snip />
> Thank you, for your continued participation.
> Let's summarize:
> [1] An associate installed sles 7.2 on a server, then asked me to
> remotely access it and correct those things that are not right.
> [2] cmos and system clocks were both set to cdt -- I prefer cmos @utc
> and system @localtime.
> [3] I had him reboot and set cmos clock to utc.
> [4] I attempted to use yast/yast2 to correct this situation; which it
> did *NOT* do.
> [5] I ran this from cli:
> hwclock --hctosys --utc
> [6] Other linux distros (e.g., debian) use this hwclock command in an
> init script to ensure that the two (2) clocks get synced at boottime.
> [7] I cannot find any suse init script remotely close to this.
> [8] I do not see how this suse system can maintain synchronization
> between cmos and hwclock.
> This is my problem:
> [a] What is the suse way to maintain this synchronization? What need I
> do to fix this the suse way?

< Previous Next >