Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

2013 year complaint

by irah (Pilgrim)
on Apr 13, 2009 at 05:44 UTC ( [id://757157]=perlquestion: print w/replies, xml ) Need Help??

irah has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks

I read from here, Perl have 2013 year complaint. I would like to know whether it is right or invalid one. Also I interested to know how the bit operation is happening for the year calculation.

Please clarify me...

Replies are listed 'Best First'.
Re: 2013 year complaint
by ikegami (Patriarch) on Apr 13, 2009 at 05:56 UTC

    Compliant and complaint are very different words. You want the former.

    I wonder what system has a problem beyond 2013. On some systems, 2038 is the problem date. Here's a Windows build emulating the unix time format:

    >perl -wle"print scalar gmtime 0x7FFFFFFF" Tue Jan 19 03:14:07 2038 >perl -wle"print scalar gmtime 0x80000000" Use of uninitialized value in print at -e line 1.

    Changes to go far beyond 2038 have recently been incorporated into blead (what will become 5.12) if not maint-5.10 (what will become 5.10.1)

    Update: By the way, DateTime can manipulate any date, not just those representable by time

      I wonder what system has a problem beyond 2013

      Looking at some of the other advice that's being provided at that link (all of which is very much tongue-in-cheek), I'd say that *none* of them do.

      Cheers,
      Rob
        For good reason it is called the "perliaq" ("Infrequently Asked Questions").

        CountZero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        doh! Thanks
Re: 2013 year compliant (humor)
by toolic (Bishop) on Apr 13, 2009 at 16:15 UTC

      Just to be explicit... it is invalid. It is a joke.

      The document is a joke, but the statement is not invalid at all. Perl has no problem with year 2013 (or 2014 or 2015 or...), and shortly, it won't have any problem with the year 2038 either.

        Unless I'm missing something, it's fine today, if you have enough bits.

        $ perl -wle"print scalar gmtime 0x7FFFFFFF" Tue Jan 19 03:14:07 2038 $ perl -wle"print scalar gmtime 0x80000000" Tue Jan 19 03:14:08 2038 $ perl -v This is perl, v5.10.0 built for x86_64-linux

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://757157]
Approved by ikegami
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-26 03:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found