Setting date correct

Setting date correct

Post by ping0.. » Sun, 02 Nov 1997 04:00:00



Every time I try to set the date/hour correct on my linux box it is
lost after a reboot. Can anyone help me out ?

I tried with 'date -s' and nist.


 
 
 

Setting date correct

Post by ping0.. » Sun, 02 Nov 1997 04:00:00


Every time I try to set the date/hour correct on my linux box it is
lost after a reboot. Can anyone help me out ?

I tried with 'date -s' and nist.

 
 
 

Setting date correct

Post by Eric Trimme » Mon, 03 Nov 1997 04:00:00



Quote:> Every time I try to set the date/hour correct on my linux box it is
> lost after a reboot. Can anyone help me out ?

> I tried with 'date -s' and nist.

On my system I do this in a script file

   nist -a -5:00:00 -d -s -t
   clock -w

You probably need the "clock -w" to set the CMOS clock.

Eric Trimmer

If vegitarians eat vegitables; beware of humanitarians !!!

 
 
 

Setting date correct

Post by Ingvar Gilber » Mon, 03 Nov 1997 04:00:00



> Every time I try to set the date/hour correct on my linux box it is
> lost after a reboot. Can anyone help me out ?

'date' only sets the system time. Unlike DOS, it does not write it directly
to the CMOS-clock. For save your current system time, "hwclock --systohc"
or, if it's not available, "clock -w". If you keep your CMOS clock in UTC,
add '-u' to the command line.
Also make sure, your bootup scripts read the system time from the CMOS clock,
using "hwclock --hctosys".

Ingvar
--
"Where were you last night?"  "That's so long ago, I don't remember."
"Will I see you tonight?"     "I never make plans that far ahead."
           -- Yvonne and Rick Blaine in ``Casablanca''

 
 
 

Setting date correct

Post by Gisbert Berge » Tue, 04 Nov 1997 04:00:00



> Every time I try to set the date/hour correct on my linux box it is
> lost after a reboot. Can anyone help me out ?

> I tried with 'date -s' and nist.



you have to set the date first (right with date) and than you have
to store it to the CMOS clock with:

clock -w (or clock -uw if using GMT).

man 8 clock

will help you more.

------------------------------------------------------------