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.

vs 5.8.8's 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.

... 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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.