FAQ: Does Perl have a Year 2000 problem? Is Perl Y2K compliant? 
Author Message
 FAQ: Does Perl have a Year 2000 problem? Is Perl Y2K compliant?

This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with every Standard Distribution of
Perl.

+
  Does Perl have a Year 2000 problem?  Is Perl Y2K compliant?

    Short answer: No, Perl does not have a Year 2000 problem. Yes, Perl is
    Y2K compliant (whatever that means). The programmers you've hired to use
    it, however, probably are not.

    Long answer: The question belies a true understanding of the issue. Perl
    is just as Y2K compliant as your pencil--no more, and no less. Can you
    use your pencil to write a non-Y2K-compliant memo? Of course you can. Is
    that the pencil's fault? Of course it isn't.

    The date and time functions supplied with Perl (gmtime and localtime)
    supply adequate information to determine the year well beyond 2000 (2038
    is when trouble strikes for 32-bit machines). The year returned by these
    functions when used in a list context is the year minus 1900. For years
    between 1910 and 1999 this *happens* to be a 2-digit decimal number. To
    avoid the year 2000 problem simply do not treat the year as a 2-digit
    number. It isn't.

    When gmtime() and localtime() are used in scalar context they return a
    timestamp string that contains a fully-expanded year. For example,
    "$timestamp = gmtime(1005613200)" sets $timestamp to "Tue Nov 13
    01:00:00 2001". There's no year 2000 problem here.

    That doesn't mean that Perl can't be used to create non-Y2K compliant
    programs. It can. But so can your pencil. It's the fault of the user,
    not the language. At the risk of inflaming the NRA: ``Perl doesn't break
    Y2K, people do.'' See http://www.*-*-*.com/
    longer exposition.

-

Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short.  They represent an important
part of the Usenet tradition.  They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.

If you are some how irritated by seeing these postings you are free
to ignore them or add the sender to your killfile.  If you find
errors or other problems with these postings please send corrections
or comments to the posting email address or to the maintainers as
directed in the perlfaq manual page.

Answers to questions about LOTS of stuff, mostly not related to
Perl, can be found by pointing your news client to


or to the many thousands of other useful Usenet news groups.

Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release.  It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.

The perlfaq manual page contains the following copyright notice.

  AUTHOR AND COPYRIGHT

    Copyright (c) 1997-1999 Tom Christiansen and Nathan
    Torkington.  All rights reserved.

This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.

                                                           04.16
--
    This space intentionally left blank



Fri, 14 May 2004 20:17:01 GMT  
 FAQ: Does Perl have a Year 2000 problem? Is Perl Y2K compliant?
On Mon, 26 Nov 2001 19:17:01 GMT, PerlFAQ Server

Quote:

>  Does Perl have a Year 2000 problem?  Is Perl Y2K compliant?

Isn't it about time to lay this dead horse to rest?

Regards,
Helgi Briem



Sat, 15 May 2004 12:22:18 GMT  
 FAQ: Does Perl have a Year 2000 problem? Is Perl Y2K compliant?

Quote:

> On Mon, 26 Nov 2001 19:17:01 GMT, PerlFAQ Server

> >  Does Perl have a Year 2000 problem?  Is Perl Y2K compliant?

> Isn't it about time to lay this dead horse to rest?

Or rewrite it as a Y2.038K (when 32bit times roll over) or a Y10D
(recently when we went to 10 decimal digits) question.  :-)

And yes, I agree it should be shot.

--
All mammals learn by playing.



Sun, 16 May 2004 15:12:16 GMT  
 FAQ: Does Perl have a Year 2000 problem? Is Perl Y2K compliant?
Michael Running Wolf  scripsit:

: > >  Does Perl have a Year 2000 problem?  Is Perl Y2K compliant?
: > >
: > Isn't it about time to lay this dead horse to rest?
:
: Or rewrite it as a Y2.038K (when 32bit times roll over) or a Y10D
: (recently when we went to 10 decimal digits) question.  :-)
:
: And yes, I agree it should be shot.

Well, I am noticing too many dates written as 28-Nov-101 to say that no
kind of "Y2K FAQ" should exist :-)

ciao, .mau.

--
Tra poco / Coming soon: http://xmau.com/



Sun, 16 May 2004 15:44:37 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Is Perl 5 year 2000 compliant?

2. Perl 5.004_04 year 2000 compliant?

3. FAQ 4.18 Does Perl have a Year 2000 or 2038 problem? Is Perl Y2K compliant?

4. FAQ 4.18 Does Perl have a Year 2000 or 2038 problem? Is Perl Y2K compliant?

5. FAQ 4.18 Does Perl have a Year 2000 or 2038 problem? Is Perl Y2K compliant?

6. FAQ 4.18 Does Perl have a Year 2000 or 2038 problem? Is Perl Y2K compliant?

7. FAQ 4.18 Does Perl have a Year 2000 problem? Is Perl Y2K compliant?

8. FAQ 4.18 Does Perl have a Year 2000 problem? Is Perl Y2K compliant?

9. FAQ 4.18 Does Perl have a Year 2000 problem? Is Perl Y2K compliant?

10. FAQ: Does Perl have a Year 2000 problem? Is Perl Y2K compliant?

11. FAQ: Does Perl have a Year 2000 problem? Is Perl Y2K compliant?

12. FAQ: Does Perl have a Year 2000 problem? Is Perl Y2K compliant?

 

 
Powered by phpBB® Forum Software