100 Years of Macintosh
Zero seconds on the Mac OS system clock is January 1, 1904. The Mac OS epoch hits 100 years ... now. That's assuming you live in the Pacific time zone, anyway: the Mac OS epoch is unique in that it is time zone-specific. Of course, none of this applies unless you are running Mac OS, and all you Mac users are using Mac OS X, right? (Geek note: the Mac OS epoch is unsigned, which is why it can count over 100 years from 0 seconds, and 32-bit Unix can't, though it can count backward to 1901.)
The Classic Mac OS epoch limit was fixed quite some time ago. I believe it was around System 8.6 if I remember correctly. Classic Mac OS has since that version had the ability to work with any date in the range from 20,000 BC to 30,000 AD.
The article confuses epoch and ticks. The epoch is a fixed point in time. Ticks is a number of seconds (or other time unit) since the epoch.
1) Who says they model themselves as a hardware company? Companies that do both hardware and the software that runs on it are common in enterprise computing (Sun, IBM, SGI, etc). Would you say these companies have little software experience because they are hardware companies? Apple is much the consumer equivalent of these; they make hardware and software woven very tightly together; the idea behind a Mac is not that you get superior hardware or superior software, but that you get a package. And that in being a cohesive package, it is superior, almost inherently, than a hodgepodge of off-the-shelf components (much like Sun's claim that Solaris is the best OS for Sparc, or SGI and IBM with IRIX and AIX (which are both perhaps on the way out, in favor of custom Linux distros)).
2) Yes, Apple patches are offered as timely as Microsoft (which is to say, perhaps not as timely as they should be). I've seen plenty of reports on Bugtraq of Apple being unresponsive to reported bugs, but then I've seen the same with MS. Presumably, they simply didn't take the issue seriously or deemed it unworthy of addressing for some other reason (which leads us back to just how trustworthy your computing really is, if you can't trust the company that designed it).
3) What ``BSD patching system''? I'm pretty well experienced with administering Open and FreeBSD, and I am totally unaware of some patching system inherent to all BSD-derived OSes (say, Solaris?). Both Open and Free have similar pkg and port systems, but this is more because Open liked the way Free did it, not because they are both BSD's (that is, BSD refers to the underlying OS components--as opposed to, say, GNU--not anything else (certainly not the kernel, which, on OSX, is Mach-, not FreeBSD-based)). I think you are confused.
Since Apple models itself a hardware company, do they offer patches on a similar basis as Microsoft or to they rely more on the BSD patching system?
Closer to Microsoft than anything else. Apple's patches generally come in the form of installer applications that can be downloaded and installed automatically via the bundled "Software Update" application (GUI and command line) or can be downloaded and installed manually from the support section of their website.
Apple does not publish the source of any of their GUI applications or the GUI framework itself. It does however release the source to the rest of the OS under the name "Darwin". Patches and other updates to Mac OS X generally find their way into Darwin and can be browsed at http://developer.apple.com/darwin.
The typical artist/writer/mom-or-dad user can click a couple buttons and have OS X update itself (or even set it to always keep itself updated). More technical users can browse the Darwin website for more details. (This was recently done by several folks wanting to know more about how Panther, Mac OS X 10.3, does its automatic defragmentation and optimizing. They dug around in the Darwin souce until they found that particular part of the HFS+ architecture. Examined the code and made a few posts explaining the process to everyone else).
Oh, yeah. And OpenDarwin provides FreeBSD-style ports, while Fink provides apt and packages based on the .deb format from Debian.
Actually all Macs are defined that way, the hardware clock is defined that way.
Little know fact (or widely known) almost all Macs will reset to January 1, 1969 if the batter is removed.
How well does Unix actually support timestamps earlier than 1970? The standard time() system call uses -1 as an error code, so even many programs would fail if the clock were set to something earlier. gettimeofday() and settimeofday() don't appear to have the same inherent limitations.
Actually it depends on the Mac - there are about 4 or 5 dates they can reset to:
1904, 1956, 1976 , 1984, 2001, depending on the machine.
This was a "Stump the Experts" Question at the 2003 world wide develoepr conference.
Some Macintosh models have clocks that reset to August 27, 1956 (and to a time other than midnight, I believe). This is the birthdate (and time) of Ray Montagne, the Apple engineer and programmer who designed the chip that controlled the PRAM on those models.
As for January 1, 1904, this date was selected because the original Mac's clock (which counts in seconds) can encompass a period of about 136 years. Selecting 1904 as the start date means that the 136-year period covered by the clock (1904-2040) includes the birthdate of nearly every Mac user, and extends well past the expected lifetime of the Mac OS. It also means that the simplest rule for leap-years can be used (every fourth year has an extra day), which simplifies day and date calculations. They didn't choose the year 1900 because it was not a leap year.
~Philly
The 2038 problems are going to raise from the integer used to store the Unix time. The maximum value that the signed, four byte Unix integer can reach is 2^16-1, and so when you put that into seconds from 1/1/1970 (The Unix Epoch time) you end up somewhere near January 2038 (leap-seconds and such will throw it off) when the variable will reach its highest value and then reset to zero, essentially setting time back to 1970. The same will happen with the Mac variable at around the same time.
Actually, in just three weeks there will be a real anniversary of the introduction of the Macintosh - January 24th, 1984.
Hopefully, just too many drinks for a New Year and not a troll. 2^16-1, which corresponds to unsigned 2 byte int, wouldn't even last for one day. INT_MAX assuming four byte integer is 2^31-1. When the variable reaches it's max value, it will change to a -2^31. Depending on how functions like ctime are implemented, this may work just fine until the start of 22nd century, set the date to 1902 or cause programs to display garbage data or even crash. It will definitely not set the date to 1970, which would correspond to 0, not INT_MIN.
Ken Thompson and Dennis Ritchie began receiving financial support from Bell Labs to port UNIX to the PDP-11 in 1970. That new version of UNIX got the first of the year as its epoch.
The previous version had 1969-01-01 as the epoch.
The time and
date corresponding to 0 in an operating system's clock and
timestamp values. Under most Unix versions the epoch is
00:00:00 GMT, January 1, 1970; under VMS, it's 00:00:00 of
November 17, 1858 (base date of the US Naval Observatory's
ephemerides); on a Macintosh, it's the midnight beginning
January 1 1904. System time is measured in seconds or ticks
past the epoch. Weird problems may ensue when the clock wraps
around which is not necessarily a rare
event; on systems counting 10 ticks per second, a signed
32-bit count of ticks is good only for 6.8 years. The
1-tick-per-second clock of Unix is good only until January 18,
2038, assuming at least some software continues to consider it
signed and that word lengths don't increase by then.
Wall Time is the `Real world' time
(what the clock on the wall shows), as opposed to the system clock's
idea of time. The real running time of a program, as opposed to
the number of ticks required to execute it (on a timesharing
system these always differ, as no one program gets all the ticks,
and on multiprocessor systems with good thread support one may get
more processor time than real time).
Wrap Around of a counter that starts over at zero or
at `minus infinity' (see infinity) after its maximum value has
been reached, and continues incrementing, either because it is
programmed to do so or because of an overflow (as when a car's
odometer starts over at 0).
Never try to beat a professional at his own game!
PalmOS was founded by former Apple employees, so this makes a lot of sense.
Apple's greatest contribution may not be it's spin on the UI or 3.5" floppies or mice or whatever, but the degree to which former Apple employees have taken lessons learned at Apple and applied them to so many new products and technologies over the last 20 years or so. So many successful startups were founded by former Apple employees.