ports/88452: Filerunner-2.5.1 modulo year = 00xx instead of 20xx in file dates
User1001
supraexpress at globaleyes.net
Thu Nov 3 13:40:16 UTC 2005
>Number: 88452
>Category: ports
>Synopsis: Filerunner-2.5.1 modulo year = 00xx instead of 20xx in file dates
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Nov 03 13:40:14 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: User1001
>Release: FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD 5.4-STABLE #0: Wed Jul 13 01:21:45 CDT 2005
>Description:
FileRunner 4-digit year date correction (%2d -> %4d) left modulo division inline which converted 20xx years to 00xx string. Change,
time_s->tm_year % 100
to
time_s->tm_year
in files/patch-ac
>How-To-Repeat:
>Fix:
*** ext.c.orig Thu Dec 30 11:21:49 1999
--- ext.c Thu Nov 3 07:26:35 2005
***************
*** 123,133 ****
HANDLE2(*p != '\0', "Error converting arg to int");
time_s = localtime(&t);
if (dateformat)
! sprintf(interp->result, "%02d%02d%02d %02d:%02d:%02d", time_s->tm_mday, time_s->tm_mon+1,
! time_s->tm_year % 100, time_s->tm_hour, time_s->tm_min, time_s->tm_sec);
else
! sprintf(interp->result, "%02d%02d%02d %02d:%02d:%02d", time_s->tm_year % 100, time_s->tm_mon+1,
time_s->tm_mday, time_s->tm_hour, time_s->tm_min, time_s->tm_sec);
return TCL_OK;
}
--- 123,134 ----
HANDLE2(*p != '\0', "Error converting arg to int");
time_s = localtime(&t);
+ time_s->tm_year = 1900 + time_s->tm_year;
if (dateformat)
! sprintf(interp->result, "%02d%02d%04d %02d:%02d:%02d", time_s->tm_mday, time_s->tm_mon+1,
! time_s->tm_year, time_s->tm_hour, time_s->tm_min, time_s->tm_sec);
else
! sprintf(interp->result, "%04d%02d%02d %02d:%02d:%02d", time_s->tm_year, time_s->tm_mon+1,
time_s->tm_mday, time_s->tm_hour, time_s->tm_min, time_s->tm_sec);
return TCL_OK;
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list