[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] UTC documentation uploaded



On Tue, 5 Dec 2000, Guido Flohr wrote:

> Just a proposal: I have finally had a look how other operating systems
> that typically share a machine with non-Unix OSes handle the UTC/Localtime
> problem. I was quite surprised to see that Linux for instance doesn't even
> try to change the hardware clock when the system time changes.  MiNT often
> behaves in the same way and until lately I have considered that a bug.
> Under Linux you need a special program hwclock to write back the system
> time to the CMOS clock.

My Linux reports "setting CMOS time" (or "setting hardware clock" or
something close to that) when it is shutting down.

> What if we would do the same in MiNT? Simply don't even try to change the
> hardware clock but leave that task to external software.  You would still
> use tzinit to tell the kernel whether the system clock is UTC or
> localtime.  But the kernel would never write that back.  Instead a new
> program - maybe hwclock - would do that.

I personally don't like that. I like to change time in XControl. Why
couldn't you change the system clock as well? You know the offset so there
shouldn't be any problem. Simply pass the GEMDOS time +- the offset to the
XBIOS call.

Petr