Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re: Y2K module? #618

Closed
p5pRT opened this issue Sep 20, 1999 · 2 comments
Closed

Re: Y2K module? #618

p5pRT opened this issue Sep 20, 1999 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 20, 1999

Migrated from rt.perl.org#1480 (status was 'resolved')

Searchable as RT1480$

@p5pRT
Copy link
Author

p5pRT commented Sep 20, 1999

From The RT System itself

OK. Here's a first shot -- a very lightly poached version of the FAQ screed.

Caveats​:

1. The FAQ points at a broken URL -- http​://language.perl.com/news/y2k.html.
  Is a working alternative available?

2. Whatever README.Y2K ends up saying should probably be pasted back into
  the FAQ.

3. "-DCFLAGS=-DPERL_Y2KWARN" is a somewhat unfriendly Configure option.
  Support for a simple -Dy2kwarn would be preferable.

4. Whatever the Configure option ends up as, it should be documented in
  INSTALL.

Inline Patch
--- /dev/null   Wed Sep 15 10:23:24 1999
+++ README.Y2K  Wed Sep 15 11:58:29 1999
@@ -0,0 +1,46 @@
+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://**Need_working_URL_here**/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  "-DCFLAGS=-DPERL_Y2KWARN".  (See the
+       file INSTALL for more information about building perl.)  

-- 

Dominic Dunlop

@p5pRT p5pRT closed this as completed Apr 22, 2003
@p5pRT
Copy link
Author

p5pRT commented Apr 22, 2003

@iabyn - Status changed from 'stalled' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant