summaryrefslogtreecommitdiff
path: root/README.Y2K
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-09-20 18:28:44 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-09-20 18:28:44 +0000
commitd566c4d64388fa0dfe772b965e119f17669e4f51 (patch)
treee2ffa0a4f0a08c85cdb41eb050fe90636d1db40a /README.Y2K
parent17b275ff7f254c13ec0fa07c81e929826b830a85 (diff)
downloadperl-d566c4d64388fa0dfe772b965e119f17669e4f51.tar.gz
add README.Y2K (from Dominic Dunlop <domo@vo.lu>)
p4raw-id: //depot/perl@4208
Diffstat (limited to 'README.Y2K')
-rw-r--r--README.Y2K47
1 files changed, 47 insertions, 0 deletions
diff --git a/README.Y2K b/README.Y2K
new file mode 100644
index 0000000000..378db15c11
--- /dev/null
+++ b/README.Y2K
@@ -0,0 +1,47 @@
+The following information about Perl and the year 2000 is a modified
+version of the information that can be found in the Frequently Asked
+Question (FAQ) documents.
+
+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. If you want perl to complain when your programmers
+ create programs with certain types of possible year 2000
+ problems, a build option allows you to turn on warnings.
+
+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 an array 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://language.perl.com/news/y2k.html for a
+ longer exposition.
+
+ If you want perl to warn you when it sees a program which
+ catenates a number with the string "19" -- a common
+ indication of a year 2000 problem -- build perl using the
+ Configure option "-Accflags=-DPERL_Y2KWARN".
+ (See the file INSTALL for more information about building
+ perl.)