I read this from an outdated perl manual.
Actually, in this case, I believe you just misunderstood what you read -- probably by a lack of knowledge about Macintosh computers.
Comparing 5.40 perldoc time:
Returns the number of non-leap seconds since whatever time the system considers to be the epoch, suitable for feeding to gmtime and localtime. On most systems the epoch is 00:00:00 UTC, January 1, 1970; a prominent exception being Mac OS Classic which uses 00:00:00, January 1, 1904 in the current local time zone for its epoch.
Returns the number of non-leap seconds since whatever time the system considers to be the epoch, suitable for feeding to gmtime and localtime. On most systems the epoch is 00:00:00 UTC, January 1, 1970; a prominent exception being Mac OS Classic which uses 00:00:00, January 1, 1904 in the current local time zone for its epoch.
... they both say the same thing.
But now that I read that, I can guess where your confusion lies: "macOS" != "Mac OS Classic".
Modern macOS (aka "OS X") is what Fletch described as not having that epoch difference, as it's *nix-based. But the ancient "Mac OS Classic", used on the 80s and 90s Mac computers, was its own creature, and is the example system that the perldoc was talking about. So perldoc correctly points out that if you're still using a 20th Century OS for your ancient Macintosh hardware, you might find the epoch starting on a different day than you expect.
... after starting this post, I decided I'd double-check on the earliest 5.8 documentation, because I couldn't remember when in the 5.8 lifetime you like staying, so I wanted to see if it was consistent... but it wasn't. Specifically, 5.8.0 perldoc time says:
Returns the number of non-leap seconds since whatever time the system considers to be the epoch (that's 00:00:00, January 1, 1904 for Mac OS, and 00:00:00 UTC, January 1, 1970 for most other systems). Suitable for feeding to gmtime and localtime.
... So yes, if you go old enough in perldoc's history, it will say "For Mac OS" instead of "being Mac OS Classic". Quoting that Wikipedia "macOS" article, "Apple shortened the name to "OS X" in 2011 and then changed it to "macOS" in 2016 to align with the branding of Apple's other operating systems." So when 5.8 started in 2002, there wouldn't have been as much confusion, since "Mac OS X" would have always been used for the most recent, and it probably would have been understood by the Mac users of the early 2000s to refer to the older OS, not the OS for new-and-shiny machines. But by 2004 with 5.8.5, it was decided to apply the "Classic" descriptor, to make sure Mac-based Perl users understood it only referred to the Classic operating system, not the "Mac OS X" which didn't have that problem.
(There is some irony in me being the one to explain this; I haven't used a Mac since the mid-90s ... and even then, I only used it when I had to for a specific class. So I am normally not the one to chime in on Mac-specific questions, here or anywhere.)
In reply to Re^4: What's so wrong with this (dereferencing)code?
by pryrt
in thread What's so wrong with this (dereferencing)code?
by Maelstrom
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |