Re: clock?


Subject: Re: clock?
From: Samuel Rydh (samuel@ibrium.se)
Date: Sat Nov 11 2000 - 09:27:26 MST


On Sat, Nov 11, 2000 at 03:42:22AM -0500, Bill Fink wrote:
> > R Shapiro wrote:
> >
> > So what is the answer to the persistent off-by-an-hour mol clock bug,
> > which appeared at the end of daylight-savings-time? Is there an
> > answer?
>
> I have a patch for this:
>
> --- mol-0.9.52/emulation/os_interface.c Mon Oct 23 16:17:09 2000
> +++ mol-0.9.52+/emulation/os_interface.c Sat Nov 11 02:22:08 2000
> @@ -194,12 +194,13 @@
> {
> #if 1
> time_t gmt;
> + struct tm *ltime;
>
> gmt = time( NULL );
> - (void) localtime( &gmt );
> + ltime = localtime( &gmt );
>
> /* 1904 -> 1970 conversion with time zone adjustment */
> - return gmt + 0x7C25B080 - timezone + (daylight? 3600: 0);
> + return gmt + 0x7C25B080 - timezone + (ltime->tm_isdst ? 3600 : 0);
> #else
> /* 1904 -> 1970 conversion */
> return time( NULL ) + 0x7C25BE85;
Excellent.

> BTW, I noticed that I can no longer "rmmod mol", as it indicates
> it's busy, even though I shut down MOL normally. I was wondering
> if this was something we had to live with now, or if it might be
> something easy to fix.

Well, this happens if mol exits without properly cleaning up.
There is a small utility 'kunload' in the mol source which
decreases the busy counter. It is not in the RPM though.

/Samuel

----------------------------------------------------------
 E-mail <samuel@ibrium.se> WWW: <http://www.ibrium.se>
  Phone/fax: (home) +46 8 4418431, (work) +46 8 7908470
----------------------------------------------------------



This archive was generated by hypermail 2a24 : Sat Nov 11 2000 - 09:27:11 MST