This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix Win32 breakage caused by changes 23535/23542.
[perl5.git] / lib / ctime.pl
index 2d5ee65..6a3f295 100644 (file)
@@ -1,4 +1,12 @@
 ;# 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
@@ -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);
 }