On Mon, 24 May 2004 13:07:06 +1200
Col <[EMAIL PROTECTED]> wrote:

> 
> >Ok fresh reboot it says the right time on my kde clock (but it has done this 
> >whole time) soo if it is not fixed my dad said tha he will help get this prob 
> >fixed....
> >
> >  
> >
> I had something similar with my gentoo install, until I modified 
> /etc/rc.conf as below.
> 
> > # Set CLOCK to "UTC" if your system clock is set to UTC (also known as
> > # Greenwich Mean Time).  If your clock is set to the local time, then 
> > set CLOCK
> > # to "local".  This setting is used by the /etc/init.d/clock script.
> >
> > #CLOCK="UTC"
> > CLOCK="local"
> 
> I think you find the shutdown scripts saves the time to the hardware 
> clock as per that setting?

thats right, the script is /etc/init.d/clock. It is in the boot runlevel,
which comes up before the default runlevel.

on startup it runs with the start parameter, and reads the hardware
clock. It interprets that as either UTC or localtime depending on whats
in /etc/rc.conf. It sets the internal software system time (which in
unix is UTC) accordingly.

The time seen by userland programs like mail clients or the date program is
converted from the internal software unix UTC clock by referring to
/etc/localtime. 

when the system shuts down the /etc/init.d/clock script runs with the
stop parameter, which saves the time back to the hardware clock. It
stores it in the hardware clock as UTC or localtime depending what is in
/etc/rc.conf, ie the same decision it made on starting.

If you run a linux only system you can set /etc/rc.conf to UTC or
localtime.[1]

Windows on the other hand expects the hardware clock to be set to
localtime, so if you dualboot you should choose the localtime option in
/etc/rc.conf, so the time will be the same in linux and windows.

[1] If you think about it, it  doesn't matter to linux whether you store
the time on the hardware  clock as local or UTC, as it can work out from
the configuration setting you gave it in /etc/rc.conf, and as long as
you are consistent. 

> 
> 
> Cheers.
> Col.

-- 
Nick Rout <[EMAIL PROTECTED]>

Reply via email to