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

Re: [MiNT] timezone change



On 2000-3-31, Jo Even Skarstein <jo-even.skarstein@stryn.online.no> wrote:

> But I'm not talking about touching the battery backed-up
> clock, which is sometimes refered to as the RTC in this
> discussion. 

...which is correct.  RTC _is_ the battery-backed clock chip.
This is an industry-wide term; do not mess its interpretation.

> I was thinking of leaving this in UTC all the time, and then
> use additional software (your Clocky could do it easily) to
> correct the clock that TOS and MagiC refer to.

The problem is, there are two possible sources for time in TOS:  

* RTC chip
* keyboard processor

Then, you have Unices, which keep their own internal time, often
referred to as time_t, which adds one more possible time source:

* time_t

Now, where should Clocky source its time reference?  I suggest
checking for those, in this order:

1) time_t 
2) RTC
3) keyboard processor

The first of those time references which is found should be used.

NOTE:  someone suggested storing the TZ offset into the keyboard
       processor's clock.  This is plain wrong!  Time differences
       between the keyboard processor and RTC are precisely what
       causes the Y2K problem we have on TOS versions prior to 2.
       Anyhow, the keyboard processor's clock is a complete mess,
       which should be avoided.  GEMDOS access points are better,
       because they update both clocks.

-- 
Martin-Éric Racine  http://funkyware.atari.org/  Atari TT030 FAQ
Lappeenranta, Finland.  Surfing on a Intel/Microsoft-free GEM OS