So I was clearing off an old 350MHz graphite Apple Macintosh G4 Server which had OS 10.4.9 on it, and decided to put Mac OS 9.2 on it for the lolz.
This was a mistake, as I had been intending to sell it, but now I am discovering old software, games and artwork I made many many years ago.
One thing that intrigued me was this dialogue box that popped up:
The motherboard’s battery long since died and I removed it, so the system clock goes back to its default setting. But why does Mac OS care if the clock is set to a date before 1973? Why 1973 specifically?
1970 is a significant date in computing – midnight UTC on 1 January 1970 is ‘the UNIX epoch‘ base. Time in Unix is measured from this point.
But 1970 is not 1973, and OS 9 is not Unix. (Its successor Mac OS X was, of course, built on Unix.)
I did a bit of digging into dates in HFS+, the Macintosh file system widely in use around the time this machine was made, around the turn of the millennium. Or Y2K if you prefer.
HFS Plus stores dates in several data structures, including the volume header and catalog records. These dates are stored in unsigned 32-bit integers (UInt32
) containing the number of seconds since midnight, January 1, 1904, GMT. This is slightly different from HFS, where the value represents local time.
The maximum representable date is February 6, 2040 at 06:28:15 GMT.
The date values do not account for leap seconds. They do include a leap day in every year that is evenly divisible by four. This is sufficient given that the range of representable dates does not contain 1900 or 2100, neither of which have leap days.
So its timestamps start in 1904. And end in 2040. So, some more dates – but neither of them is 1973!
I tried searching the internet for anything about Mac OS and 1973, about the text of the dialogue box and found almost nothing. I did find a TikTok about an old clamshell iBook and this poem by Jeffrey Joe Nelson:
System Note
Your Macintosh’s clock is set to a year before 1973.
This may cause certain of your pomes to behave erratically.
So then I asked around at work, and after kicking around a few ideas, a colleague has, I think, probably solved it.
Look at the wording of that dialogue box very carefully…
Network time error
Your Macintosh’s clock is set to a year before 1973. This may cause certain applications to behave erratically.
[my bold]
Now my colleague reasoned thus:
Counting seconds in a 32 bit number gives you 136 years’ worth of counting.
If the classic Apple Mac OS epoch (zero time) is indeed 1904, then 1973 would be precisely half way through that range.
If for reasons of temporary insanity, say, a third party developer held that as a signed 32 bit number, anything before 1973 would look negative. Negative time sounds like a dangerous concept. Certainly one that could cause applications to behave erratically.
No-one inside Apple would be so foolish.
But the developer of certain applications might!
I think he’s cracked it! What do you think?
Updates!
@prozacchiwawa@functional.cafe on Mastodon adds this intriguing comment:
If an app cheaply checked whether subtracting two dates yielded a positive or negative result in signed space, moving the two dates farther apart than half the unsigned space could fool it. I’m wondering if that’s what they had in mind.
For example, 2023 (0xdfeb9580) – 1941 (0x4599a080) yields 0x9a51f500, which might mean to some apps that 2023 is before 1941.