hwclock has life of its own

Aurel Wisse yellowdog-general@lists.terrasoftsolutions.com
Sat Feb 1 15:52:01 2003


> >I'll try tomorrow switching the hwclock to UTC and
> see what happens.
> 
>  Good luck! Let us know how it goes.
>
Well, with the hwclock set to UTC, I get EST-5 with
the `date` command, and not localtime anymore. And
date --utc gives me the localtime, i.e. EST.

My conclusions are:
1) I leave the hardware clock at localtime, with
/etc/adjtime having LOCAL as third line (for
/sbin/hwclock) plus UTC=false in /etc/sysconfig/clock 
 for /etc/rc.sysinit and /etc/rc.d/init.d/halt.
2) If I want the local time, there is always `date`,
and for UTC, `date --utc` shows the correct value. The
value of /sbin/clock -r --utc doesn't matter while
linux is up and running on my box.
3) My time will be perfectly OK due to ntpd. The
hwclock is only there for reboots. And the only way to
get the hwclock to set the system clock correctly (in
/etc/rc.sysinit) at boot time is with the above
settings (on my iMac anyway).

Best regards and thanks  for the input,

Aurel
--- Christopher Murtagh
<christopher.murtagh@mcgill.ca> wrote:
> On Wed, 29 Jan 2003, Aurel Wisse wrote:
> >I think that the fact that both clock -r and clock
> -r
> >--utc come up with the same time in your context is
> >because, probably, the third line in your
> /etc/adjtime
> >is UTC. 
> 
>  Yup.
> 
> [chris@mafalda chris]$ cat /etc/adjtime
> -38961.332031 1043731977 0.000000
> 1043731977
> UTC
> 
>  Although, I didn't set this manually. Is this the
> default? I did have to
> change /etc/sysconfig/clock to UTC=true manually.
> 
> >Did you try /sbin/clock -r --localtime, for fun?
> 
> [chris@mafalda chris]$ /sbin/clock -r --localtime
> Thu 30 Jan 2003 03:50:45 AM EST  -0.548219 seconds
> [chris@mafalda chris]$ date
> Wed Jan 29 22:50:52 EST 2003
> 
> ouch!
> 
> >I'll try tomorrow switching the hwclock to UTC and
> see what happens.
> 
>  Good luck! Let us know how it goes.
> 
> Cheers,
> 
> Chris
> 
> -- 
> 
> Christopher Murtagh
> Webmaster / Sysadmin
> Web Communications Group
> McGill University
> Montreal, Quebec
> Canada
> 
> Tel.: (514) 398-3122
> Fax:  (514) 398-2017
>  
> 
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general@lists.terrasoftsolutions.com
>
http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com