This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
More leniency to the \p and \P: now can have whitespace
[perl5.git] / lib / ctime.pl
index 6000d29..6a3f295 100644 (file)
@@ -1,9 +1,17 @@
 ;# ctime.pl is a simple Perl emulation for the well known ctime(3C) function.
+#
+# This library is no longer being maintained, and is included for backward
+# compatibility with Perl 4 programs which may require it.
+#
+# In particular, this should not be used as an example of modern Perl
+# programming techniques.
+#
+# Suggested alternative: the POSIX ctime function
 ;#
 ;# Waldemar Kebsch, Federal Republic of Germany, November 1988
 ;# kebsch.pad@nixpbe.UUCP
 ;# Modified March 1990, Feb 1991 to properly handle timezones
-;#  $RCSfile: ctime.pl,v $$Revision: 4.0.1.1 $$Date: 92/06/08 13:38:06 $
+;#  $RCSfile: ctime.pl,v $$Revision: 4.1 $$Date: 92/08/07 18:23:47 $
 ;#   Marion Hakanson (hakanson@cse.ogi.edu)
 ;#   Oregon Graduate Institute of Science and Technology
 ;#
@@ -44,7 +52,7 @@ sub ctime {
     }
     $TZ .= ' ' unless $TZ eq '';
 
-    $year += ($year < 70) ? 2000 : 1900;
+    $year += 1900;
     sprintf("%s %s %2d %2d:%02d:%02d %s%4d\n",
       $DoW[$wday], $MoY[$mon], $mday, $hour, $min, $sec, $TZ, $year);
 }