[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Weird IIgs Rom 01 bug
Hi again,
That's pretty much what I finally figured out. But just one question.
1904? Why 1904? If they'd gone with the Unix epoch of 1970, we'd at least
be good until somewhere around 2106 or so.
Also, it would appear that we, just like Unix, are only dealing with the
positive side of the integer. Why oh why didn't they use unsigned ints?
Because of my successful attempt to set the clock to 1900, which was the
absolute lowest I could go using my program for technical reasons, I must
assume that in that case the integer was negative. So it probably goes back
way into the 1800's and possibly back into the 1700's!
Jayson.
"Benjamin Ketcham" <bketcham@drizzle.com> wrote in message
news:1098264737.13176@yasure...
> Jayson Smith <nospamratguyspambegone@nospamplease.bellsouth.ihatespam.net>
wrote:
> > Hi,
> > I've been playing around with a program I have which lets blind people
> > adjust control panel settings without having to go into the desk
accessory.
> > I was fiddling around with the clock section, doing some peeking, poking
and
> > setting of the clock and found some very weird behavior so I wrote a
clock
> > print/set program to discover exactly what happens.
> > It seems that at least on the Rom 01 GS, at exactly 06:28:16 on
02/06/2040
> > the time becomes 00:00:00 on 01/01/1904. This happens no matter if you
set
> > the clock to a date/time past that mark or if you set it a few seconds
> > before and let it pass that time naturally. Quite literally, one second
> > it's 06:28:15 on 02/06/2040 and the next second it's 00:00:00 on
01/01/1904.
> > I think this might happen once or twice more between then and the year
2155,
> > the highest year the clock format could handle. Setting the date to
> > 12/31/2155 and the time to 23:59:59 yielded 23:59:59 on 07/27/1976 or
> > something like that.
> > Now I seriously doubt that there will be many IIgs's still functional in
the
> > year 2040 but I just wanted to let people know about this weirdness and
see
> > if anybody has any thoughts about what might be causing it.
> > This is untested on a Rom 00 or 03 as I don't have those machines. If
> > anybody wants, I can send the Prodos Basic program I've been using for
my
> > experimentations.
> > Jayson.
>
> Perhaps this is due to rollover of the integer type used for clock timing
> on this machine; similar to 32-bit Unix, which will have a problem in
> something like 2027. Unix counts the seconds since Jan 1 1970; when
> that is stored as a 32-bit integer (uh, signed IIRC), that's how many
> you get. Of course 64-bit data types push the rollover time well out
> there... I'm sure almost 60 years seemed like overkill at the time, but
> the fact is that old machines continue to be used, and it is damn
> inconvenient for them to have a built-in failure mechanism.
> I bet there will be *some* Apple IIs of every flavour still running --
> even in 500 years (perhaps with relatively few original parts by then).
> (Why can't these OSes at least support a "shiftable Epoch"??)
>
> --Benjamin
>