Date: Wed, 19 Aug 1998 17:51:34 +0200 (CEST) From: Stephane Legrand <stephane@lituus.fr> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: ports/7681: [PORTS] TkDesk 1.0 is not Y2K compliant Message-ID: <199808191551.RAA03673@sequoia.lituus.fr>
next in thread | raw e-mail | index | archive | help
>Number: 7681 >Category: ports >Synopsis: [PORTS] TkDesk 1.0 is not Y2K compliant >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Aug 19 09:30:01 PDT 1998 >Last-Modified: >Originator: Stephane Legrand >Organization: >Release: FreeBSD 3.0-CURRENT i386 >Environment: >Description: TkDesk 1.0 is not Y2K compliant. This is NOT only on FreeBSD and the bug is only a TkDesk one. The bug appears in the file list window. A file with a year date > 2000 is displayed with a year looking like "191xx" where xx is the two last number of the real date. The following patch (made by the TkDesk author) correct the problem : ---- In file dsk_ls.c, function file_time() there is the following code sequence: else { timestr[6] = '\0'; strcat (timestr, " 19"); strcat (timestr, itoa (filetm.tm_year)); } Obviously, that segment should be changed to something like the following: else { timestr[6] = '\0'; if (filetm.tm_year < 100) { strcat (timestr, " 19"); strcat (timestr, itoa (filetm.tm_year)); } else { filetm.tm_year -= 100; sprintf (timestr, "%s 20%02d", timestr, filetm.tm_year); } } ---- >How-To-Repeat: >Fix: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808191551.RAA03673>