Time Problem

Joe Villari yellowdog-general@lists.terrasoftsolutions.com
Sat Dec 21 06:47:01 2002


>Peter Bagnall wrote:
>>MacOS and Linux use different ways of storing the time in the real 
>>time clock. One (and I forget which way round this is) uses UCT and 
>>the other uses local time. There is a way to force linux to do the 
>>same thing that MacOS does.
>>
>>On Friday, December 20, 2002, at 03:30 PM, Joe Villari wrote:
>>>After upgrading my TI PowerBook from 2.1 to 2.3 I've developed a 
>>>problem with the time. When ever I boot into YDL it gives me a 
>>>time which is about either 5 hours before or after the current 
>>>time. It's not consistent.
>>>
>>>I've tried resetting the time from within KDE but if I boot into 
>>>MAC OS the time is incorrect again and when I reboot into YDL it's 
>>>not right again. My time zones remain correct.
>
>Mac OS 9 stores local time in the hardware clock.  Linux generally 
>prefers to store UTC.  I'd assume Mac OS X can store UTC, given that 
>it's also Unix.
>
>As far as I know, there is no way to get OS 9 to store UTC.  So you 
>need to get Linux to store local time.  The disadvantage of this is 
>that you'll have to manually change the time when going to and from 
>daylight savings.
>
>Two things have to be done.  When Linux starts up and reads the 
>hardware clock, it needs to know to read local time.  This can be 
>done with the hwclock command.  Look for hwclock somewhere in the 
>startup scripts and change the options appropriately (the man page 
>will have details).
>
>Second, when you change the time in Linux, you want it stored in 
>local time.  There's probably a way to have this happen 
>automatically, but I don't know how.  You can just run hwclock by 
>hand every time you correct the time.
>
>Myself, I use Mac OS so rarely that I just leave the hardware clock 
>as UTC, and accept that the time will be wrong in Mac OS.  Plus I 
>run ntpd, so the time is always correct without me having to fix it.
>--
>patsmith@pobox.com

I read the man page for hwclock but was still unable to keep the time 
constant after reboot. Even though during boot up the time would be 
correct and say (localtime) when I startx, the time in KDE would be 
either five or ten hours off.

I was able to get the time set where it would remain 5 hours behind 
eastern time zone.
My fix was to change my time zone to GMT and now everything is the 
same time, MAC OS, YDL and in KDE. It's a sloppy work around but it 
does work.

Joe