[UCI-Linux] Re: problem with hwclock

Joachim Feise jfeise@ics.uci.edu
Sun, 06 Oct 2002 09:02:38 -0700

Dirk Groeneveld wrote:
> Joachim Feise wrote:
>  > Dirk Groeneveld wrote:
>  >> I hope you can help me with this problem:
>  >> My hardware clock is correctly set to UTC, but my system clock is,
>  >> too, even after rebooting (especially after rebooting) or executing
>  >> /etc/init.d/clock, which is supposed to set the system clock
>  >> correctly. I traced the problem down to hwclock. hwclock --hctosys
>  >> behaves exactly the same way as hwclock --hctosys --utc. TZ is not
>  >> set, but setting it doesn't seem to make a difference. /etc/localtime
>  >> points to /usr/share/zoneinfo/US/Pacific.
>  > What are your parameters for clock?
>  > My Slackware installation calls /sbin/clock -u -s at boot time.
> I don't have /sbin/clock. I don't have any "clock" executable file on my 
> system except for /etc/init.d/clock.
> I forgot to mention: I use Gentoo Linux. So I looked in /usr/portage if 
> there's a clock package, but found nothing.

Well, I don't know anything about Gentoo.
As far as clock is concerned, it is an older program, according to
BTW, it is no surprise that hwclock --hctosys works the same with or without
--utc. The hwclock man page states that if --utc or --localtime is missing,
hwclock uses whichever was used the last time.
You may also have to look into adjtimex and the config file /etc/adjtime.
In any case, I don't use either one. I'm running ntpd, which takes care
of keeping the clock synchronized.