X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fctime.pl;h=6a3f295968670ecb143024d2d6ac6b8ec80f46c2;hb=b1fbf5c3d1dc6dd7934002da04dede2ae2e3ef65;hp=2d5ee65e3691c034b4db4686e639ddfe93a292be;hpb=79072805bf63abe5b5978b5928ab00d360ea3e7f;p=p5sagit%2Fp5-mst-13.2.git 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); }