summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authordanny <danny@FreeBSD.org>1999-01-15 12:05:57 +0000
committerdanny <danny@FreeBSD.org>1999-01-15 12:05:57 +0000
commit0e3575bb77f891ea0d19c315cfb011813fbbefb0 (patch)
tree014211ae03c5c98557833e1b3d2d15199af781d7 /contrib
parentdd8cc45b89f76156e1314ab61b34373434f5b257 (diff)
downloadFreeBSD-src-0e3575bb77f891ea0d19c315cfb011813fbbefb0.zip
FreeBSD-src-0e3575bb77f891ea0d19c315cfb011813fbbefb0.tar.gz
Tidy logic in sccs2rcs,
Fix y2kbug "19$year" in log.pl PR: 9501 Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cvs/contrib/log.pl5
-rw-r--r--contrib/cvs/contrib/sccs2rcs.csh2
2 files changed, 4 insertions, 3 deletions
diff --git a/contrib/cvs/contrib/log.pl b/contrib/cvs/contrib/log.pl
index e4fb9b1..4bb935a 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 310e271..8243890 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"
OpenPOWER on IntegriCloud