Date: Thu, 3 Nov 2005 07:35:04 -0600 From: "User1001" <supraexpress@globaleyes.net> To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org> Subject: ports/88452: Filerunner-2.5.1 modulo year = 00xx instead of 20xx in file dates Message-ID: <1131024904.0@freebsd2.localnet10> Resent-Message-ID: <200511031340.jA3DeFJJ024972@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1131024904.0>