Subject: Time... is on my side.
To: None <macbsd-general@sun-lamp.cs.berkeley.edu>
From: John D. Smerdon <jds@smerdon.plymouth.mi.us>
List: macbsd-general
Date: 04/17/1994 21:44:14
I have been looking at why my MacOS clock differs from the NetBSD clock by
about five minutes.  I added the (* 60) to the equations below and the time
was correct at the start of the initialization.  By the end of the
initialization, the time was off by 32 seconds.  This difference over a
hour started to become greater.  After being gone most of the day (while my
4MB SE/30 compiled another kernel), the time was off by about 20 minutes.

With only 4MB of memory, I am really testing VM.  So I wondered, are
interrupts (clock updates) disabled during a VM pagein/pageout?

That might explain the time drift.

Where is the compile define -DTIMEZONE = 0x012c used in the kernel?

Comments welcome!

Changes are:

>/*
> * convert a Mac PRAM time value to GMT, using /etc/TIMEZONE.
> */
>u_long ugmt_2_pramt(u_long t)
>{
>   /* don't know how to open a file properly. */
>   /* assume compiled timezone is correct. */
>
>   return(t = t + DIFF19041970 - (tz.tz_minuteswest * 60));
>}
>
>/*
> * convert GMT to Mac PRAM time, using global timezone
> */
>u_long pramt_2_ugmt(u_long t)
>{
>   return(t = t - DIFF19041970 + (tz.tz_minuteswest * 60));
>}

--
John D. Smerdon; Plymouth, Michigan; Contents are my opinion.
Internet: jds@smerdon.plymouth.mi.us; UUCP: umcc!smerdon!jds


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