Still having Time Issues

Aurel Wisse yellowdog-general@lists.terrasoftsolutions.com
Mon Feb 10 18:41:01 2003


Thomas,

I have settled this issue for me as follows:

1) The Mac keeps the hwclock in localtime. Actually,
forcing it to UTC (from MacOS) made things worse for
me  because of  the following issue:
2) The hwclock program in ppclinux seems to apply the
--utc incorrectly: it applies the timezone offset with
the wrong sign. Actually, you can see that the output
of hwclock --utc is labelled in CST. It takes the time
in the clock, interprets it as UTC, and adds (-6 in
your case) in order to get ... garbage. Now imagine
what happens if the hwclock is set to the UTC: hwclock
--utc will give you ... CST, and hwclock --localtime
gives ... UTC!!!
3) This doesn't matter because the only use of the
hwclock is at system startup in order to set the
System clock. (And then, if you et up your ntp client,
you can have the exact time systematically).
4) The official program to get the correct time in
loca or utc seems to be `date`. It gives the correct
values for me with and without the --utc flags.
5) Concerning the timestamps on logs and emails, it
depends which method is used by the respective
programs. If they use the hwclock with the --utc flag
and expect to get UTC, they will be wrong. But the
"official" time on Linux is the System time and it is
obtained through the `date` program.

Aurel Wisse
--- Thomas Kernes <tkernes@buckwestern.com> wrote:
> I was wondering if that time issue got figured out
> (Aurel Wisse) as I have
> been following it to try and solve my own problems.
> 
> Clock is set correctly on Mac side.
> 
> /etc/sysconfig/clock is:
> 
> ZONE="US/Central"
> UTC=false
> ARC=false
> 
> 
> /etc/localtime ->
> /usr/share/zoneinfo/America/Chicago
> 
> 'date' is  Sun Feb  9 12:26:27 CST 2003  <-- correct
> 
> 'hwclock --localtime' is Sun 09 Feb 2003 12:27:04 PM
> CST <--correct
> 
> 'hwclock --utc' is Sun 09 Feb 2003 06:27:42 AM CST
> <-- WRONG
> 
> 
> I set the clock by setting the system date and then:
> 
> 'hwclock --systohc --localtime'
> 
> But the hwclock seems to be adjusting the WRONG way
> for UTC.  I have tried
> setting the hwclock to UTC (which is +6 hours from
> CST) but then the local
> time is off (it makes the local time +6 hours when
> it should be -6 hours).
> 
> I have seen just about every webpage google finds
> for setting the hwclock
> and nothing is working.
> 
> This is not that big of a deal, I guess, but it
> makes the times on my emails
> incorrect when checking squirrelmail versus POP.  It
> also makes the times in
> various log files incorrect.
> 
> Anyone?
> 
> YDL 2.3 beige G3/466 512Mb RAM
> 
> -- 
> Thomas Kernes
> tkernes@buckwestern.com
> 
> 
> _______________________________________________
> 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