Well ... yes and no. You don't want to reset the clock willy-nilly, but you
do want to be able to correct for drift over time, and you need to give the
kernel clock an initial time at boot.
On my system, the initial time comes from /sbin/clock, which returns the
time in the hardware (BIOS) clock. Look in your rc* scripts for a line that
calls either /sbin/clock or /sbin/hwclock ("man hwclock" and "man 8 clock"
for details). If this time is unreliable (due to a Y2K problem or just a
cheap clock chip), you can instead get the time from a time server using any
of several protocols -- e.g., timed or ntp. (I recall a client called rdate
that does this, but I can't find it at the moment, and my memory may be shaky.)
If the time drifts relative to some more reliable reference (a better
server, say), you can use the same protocols to synchronize their times
periodically. On you can use the -a option in /sbin/clock to track and
correct for drift in the CMOS clock relative to the system clock (see the
man page for the details - I haven't tried this myself).
In either case, you DON'T need to set the system (CMOS) clock to fix the
problem -- you only need to set the clock in the kernel (using the date
command). But it shouldn't hurt -- though it will be useless if the
BIOS-based time has a Y2K problem. But since the kernel doesn't use the BIOS
clock except to get its initial time during the boot process, resetting the
BIOS clock won't have any bad effects on the /proc filesystem, file
timestamps, etc.
At 05:05 PM 4/18/99 -0600, Matthew McCleary wrote [abridged]:
>Well, I seem to remember from somewhere that, even if there were a
>way, it would be a really, really bad idea to set the computer's clock
>from within Linux.
>On Sun, 18 Apr 1999, Akintayo Holder wrote:
>
>> 1. How do I go about setting my BIOS clock from Linux ?. Is there a way
>> to synchronize the BIOS with Linux system time - where Linux time is
>> used to set the BIOS. So the next time I reboot I get the correct time
------------------------------------"Never tell me the odds!"---
Ray Olszewski -- Han Solo
762 Garland Drive
Palo Alto, CA 94303-3603
650.328.4219 voice [EMAIL PROTECTED]
----------------------------------------------------------------