1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-30 21:49:25 +00:00
freebsd-ports/x11-fm/filerunner/files/patch-ac
Vanilla I. Shu 8fdc987490 Add a patch for Y2K.
Submitted by:	Jim Dutton <jimd@dutton3.it.siu.edu>
2000-09-02 16:02:31 +00:00

18 lines
810 B
Plaintext

--- ext.c.orig Wed Jun 10 05:55:32 1998
+++ ext.c Sat Sep 2 23:56:45 2000
@@ -123,11 +123,12 @@
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%02d %02d:%02d:%02d", time_s->tm_mday, time_s->tm_mon+1,
+ 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, "%02d%02d%02d %02d:%02d:%02d", time_s->tm_year, time_s->tm_mon+1,
+ 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;
}