From gnb@itga.com.au  Mon Jan  3 15:14:13 2000
Return-Path: <gnb@itga.com.au>
Received: from ns.itga.com.au (ns.itga.com.au [202.53.40.210])
	by hub.freebsd.org (Postfix) with ESMTP id EA6F414D42
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  3 Jan 2000 15:14:09 -0800 (PST)
	(envelope-from gnb@itga.com.au)
Received: from lightning.itga.com.au (lightning.itga.com.au [192.168.71.20])
	by ns.itga.com.au (8.9.3/8.9.3) with ESMTP id KAA08599
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 4 Jan 2000 10:14:08 +1100 (EST)
	(envelope-from gnb@itga.com.au)
Received: from hellcat.itga.com.au (hellcat.itga.com.au [192.168.71.163])
	by lightning.itga.com.au (8.9.3/8.9.3) with ESMTP id KAA01801;
	Tue, 4 Jan 2000 10:14:07 +1100 (EST)
Received: (from gnb@localhost)
	by hellcat.itga.com.au (8.9.3/8.9.3) id KAA47271;
	Tue, 4 Jan 2000 10:14:07 +1100 (EST)
	(envelope-from gnb@itga.com.au)
Message-Id: <200001032314.KAA47271@hellcat.itga.com.au>
Date: Tue, 4 Jan 2000 10:14:07 +1100 (EST)
From: Gregory Bond <gnb@itga.com.au>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] hylafax reporting not y2k
X-Send-Pr-Version: 3.2

>Number:         15868
>Category:       ports
>Synopsis:       [patch] hylafax reporting not y2k
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan  3 15:20:00 PST 2000
>Closed-Date:    Sun Jan 23 20:54:24 PST 2000
>Last-Modified:  Sun Jan 23 20:54:58 PST 2000
>Originator:     Gregory Bond
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
ITG Australia Limited
>Environment:

FreeBSD 3.4-STABLE, hylafax-4.0.2 port.

>Description:

The reporting function of hylafax (xferstats) is not y2k compatible.

>How-To-Repeat:

	run
		xferstats -age 7
	and note that all faxes since the beginning of time are summarised.

>Fix:
	

doorman## diff -u xferstats.orig xferstats
--- xferstats.orig      Wed May 12 00:36:05 1999
+++ xferstats   Tue Jan  4 09:43:46 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];


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sun Jan 23 20:54:24 PST 2000 
State-Changed-Why:  
Committed, thanks! 
>Unformatted:
