X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/79072805bf63abe5b5978b5928ab00d360ea3e7f..375b6f9c3cf61249fbff2151731131e9a0b72a6c:/lib/ctime.pl diff --git a/lib/ctime.pl b/lib/ctime.pl index 2d5ee65..6a3f295 100644 --- a/lib/ctime.pl +++ b/lib/ctime.pl @@ -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); }