HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xferfaxlog and Y2K



Hi Alan,

At 04:48 PM 12/13/99 -0800, Alan Sparks wrote:
>I can't find a mention of this in the archives... Is there a patch for
>HylaFAX 4.0pl2 to fix the Y2K bug in xferfaxlog and the faxcron script?   I
>note that the xferfaxlog BUGS section states, "The date format will
>``break'' in the year 2000." Hmm..
>
>Patches?  Suggestions?  Thanks in advance.

The xferfaxlog file records the day with 2 digits for the year ie MM/DD/YY 
HH:MM

The xferfaxstats script parses it to produce a summary report....does 
xferfaxstats break if fed output where some of dates have a '00' year?


If needed i can quite easily fix it so that the faxq/faxsend output the 
date with four digits, but i am not really very keen on modifying the 
xferfaxstats awk script it is way out of control ;-)


Cutting from line 184:

#
# Convert MM/DD/YY hh:mm to seconds.
# NB: this does not deal with leap years.
#
function cvtDateTime(s)
{
     yday = substr(s,7,2)*365 + substr(s,4,2) - 1;
     mon = substr(s,0,2) + 0;
     for (i = 0; i < mon; i++)
     yday += daysInMonth[i];
     return yday*FULLDAY + cvtTime(substr(s,10) ":00");
}

...which offhand looks like it will break!

PS At worst this should just affect the fax reporting not the fax servers 
operation, i think.

- Robert





Project hosted by iFAX Solutions