On Nov 9, 2010, at 12:40 PM, Michael G Schwern wrote:
On 2010.11.9 9:31 AM, Joshua Juran wrote:
Dual-booting OS 9 and OS X demonstrates OS X using local time as
well. I
don't know what happens on Macs that can't boot classic Mac OS.
I can assure you OS X is using a UTC clock.
Of course it is. But I suspect it's storing local time in the clock
chip.
What you're likely seeing is OS 9
setting the system clock to localtime and OS X interpreting that as
UTC. What
behavior are you seeing?
I haven't switched between OS 9 and OS X in months, but I've done so
on three different machines and don't ever recall a clock
interpretation mismatch.
I used to see problems dual booting between Windows XP and Linux
until they
somehow figured out how to live together. It's unlikely Apple put
in the
effort to make OS 9 and OS X dual boot well.
Quite the contrary. Apple went to considerable effort to make OS 9
and OS X interoperable, to encourage users and developers to switch to
the new platform. The Carbon API was created in response to developer
backlash against being forced to rewrite everything for OS X (using
Cocoa).
Once most of their installed base had made the leap, it was time to
stop helping and start hindering. Mac OS X is now more interoperable
with Windows systems from ten years ago than with Macs of the same
era. I gave up trying to migrate my parents' files to their new iMac
(Intel, Tiger) using Apple's own implementations of their own filing
protocol when files were silently being truncated (e.g. a 23K GIF down
to 45 bytes) and burned a CD-R instead. Hooray for data loss.
Why are you dual booting OS 9 anyway?
You mean why am I booting OS 9?
Short answer: I write code targeting classic Mac OS, and the closed-
source developer tools I rely on depend on it.
Why am I dual booting? The Titanium PowerBook is dual-booted because
that used to be my primary system (running OS X) and I'd boot into OS
9 for snappier responsiveness overall and especially better
performance than Classic for compiling. Now it's a build slave, and
it stays in OS X so I can use it over VNC. (Build performance is
better now that I use a standalone C preprocessor so I'm avoiding most
of the crappy I/O subsystem tax) My G4 iMac has Jaguar installed only
because the OS 9 System Restore utility it shipped with is an OS X app.
You're right that OS 9 uses local time, even their *epoch* (1904) is
in local
time. I found an interesting snippet about it on
http://calendars.wikia.com/wiki/Epoch_%28reference_date%29 (did YOU
know
there's a wiki about calendaring?)
January 1, 1904, was chosen as the base for the Macintosh clock
because
it was the first leap year of the twentieth century. [...] This
means
that by starting with 1904, Macintosh system programmers could
save a
half dozen instructions in their leap-year checking code, which
they
thought was way cool.
It also spares Mac OS the Year 2038 problem. Instead, it has a Year
2040 problem.
Which also explains why you'd design a system with a local system
clock. You
don't have to do expensive time zone calculations just to show the
time.
Think 80s processing power. That it held on for so long in OS 9 and
XP is
just horrible.
They could have stored global time in the clock chip and local time in
low memory, but then you'd still need OS and GUI support for switching
time zones.
Josh