Fix a Y2K problem.

PR:		15868
Submitted by:	Gregory Bond <gnb@itga.com.au>
This commit is contained in:
Steve Price 2000-01-24 04:54:44 +00:00
parent 761385b6c3
commit e92b5356c6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=25003

View File

@ -0,0 +1,13 @@
--- util/xferstats.sh.in.orig Sun Jan 23 19:45:49 2000
+++ util/xferstats.sh.in Sun Jan 23 19:45:29 2000
@@ -186,7 +186,9 @@
#
function cvtDateTime(s)
{
- yday = substr(s,7,2)*365 + substr(s,4,2) - 1;
+ y = substr(s,7,2);
+ if ( y < 50) y += 100;
+ yday = y*365 + substr(s,4,2) - 1;
mon = substr(s,0,2) + 0;
for (i = 0; i < mon; i++)
yday += daysInMonth[i];