From 6af24c708d2a9c924adea6bbaa9e60a79ec32763 Mon Sep 17 00:00:00 2001 From: Daniel O'Callaghan Date: Fri, 15 Jan 1999 12:05:57 +0000 Subject: [PATCH] Tidy logic in sccs2rcs, Fix y2kbug "19$year" in log.pl PR: 9501 Submitted by: Peter Jeremy --- contrib/cvs/contrib/log.pl | 5 +++-- contrib/cvs/contrib/sccs2rcs.csh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/cvs/contrib/log.pl b/contrib/cvs/contrib/log.pl index e4fb9b1d3fb..4bb935a5f33 100644 --- a/contrib/cvs/contrib/log.pl +++ b/contrib/cvs/contrib/log.pl @@ -91,6 +91,7 @@ $mailcmd = "| Mail -s 'CVS update: $modulepath'"; @days = (Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime; +$year+=1900; # get a login name for the guy doing the commit.... # @@ -111,12 +112,12 @@ if ($users) { # print OUT "\n"; print OUT "****************************************\n"; -print OUT "Date:\t$days[$wday] $mos[$mon] $mday, 19$year @ $hour:" . sprintf("%02d", $min) . "\n"; +print OUT "Date:\t$days[$wday] $mos[$mon] $mday, $year @ $hour:" . sprintf("%02d", $min) . "\n"; print OUT "Author:\t$login\n\n"; if (MAIL) { print MAIL "\n"; - print MAIL "Date:\t$days[$wday] $mos[$mon] $mday, 19$year @ $hour:" . sprintf("%02d", $min) . "\n"; + print MAIL "Date:\t$days[$wday] $mos[$mon] $mday, $year @ $hour:" . sprintf("%02d", $min) . "\n"; print MAIL "Author:\t$login\n\n"; } diff --git a/contrib/cvs/contrib/sccs2rcs.csh b/contrib/cvs/contrib/sccs2rcs.csh index 310e2710f19..8243890603d 100644 --- a/contrib/cvs/contrib/sccs2rcs.csh +++ b/contrib/cvs/contrib/sccs2rcs.csh @@ -177,7 +177,7 @@ foreach sfile (SCCS/s.*) if ($status != 0) goto ERROR # get file into current dir and get stats - set date = `sccs prs -r$rev $file | grep "^D " | awk '{y=$3+1900; if($3 < 1970) {y+=100};printf("%s %s", y, $4);exit;}'` + set date = `sccs prs -r$rev $file | grep "^D " | awk '{y=$3; if($3 < 100) {y+=1900};printf("%s %s", y, $4);exit;}'` set author = `sccs prs -r$rev $file | grep "^D " | awk '{print $5; exit}'` echo "" echo "==> file $file, rev=$rev, date=$date, author=$author"