Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Why does localtime() return 1900-$YEAR?

by szabgab (Priest)
on Jan 31, 2011 at 13:51 UTC ( #885275=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Why does localtime() return 1900-$YEAR?
in thread Why does localtime() return $YEAR-1900?

Perl was first released in 1987. The memory issue was much less important by that time and I am quite sure people were already aware of the bug 2000.

Though that's an interesting other question. When did people start to talk about "bug 2000"?


Comment on Re^3: Why does localtime() return 1900-$YEAR?
Re^4: Why does localtime() return 1900-$YEAR?
by ikegami (Pope) on Jan 31, 2011 at 16:15 UTC
    Dunno, but Perl has already addressed the y2038 bug. That's when the years would overflow even when subtracting 1900.
Re^4: Why does localtime() return 1900-$YEAR?
by Utilitarian (Vicar) on Feb 01, 2011 at 09:28 UTC
    Hmm, I worked on a COBOL system with 2 digit dates in the late 80's / early 90's and there was no pressure to modify the date structures. So I'm not sure people were as prescient as you assume.

    The first time I heard mention of the Y2K issue was '97 when a friend let it be known to a recruiter that I could work in COBOL >>>Shudder<<<

    print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
Re^4: Why does localtime() return 1900-$YEAR?
by apl (Monsignor) on Feb 01, 2011 at 11:11 UTC
    Perl was first released in 1987.
    Quite true, but the Unix time structure (which defined the year as an offset from 1900) has been a de facto standard since around 1975.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://885275]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2015-07-02 01:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls