The file ftp://elsie.nci.nih.gov/pub/c-common.c is now available; this is a replacement for c-common.c in gcc (either 2.7.2 or 2.7.2.1) that does strftime format checking (with special warning for formats that generate two digits worth of years and thus may be especially subject to year 2000 challenges). If anyone has feedback before I ship it off to the GNU folk, I'd love it! --ado
In message <9608192125.AA20430@elsie.nci.nih.gov>, Arthur David Olson writes:
The file ftp://elsie.nci.nih.gov/pub/c-common.c is now available; this is a replacement for c-common.c in gcc (either 2.7.2 or 2.7.2.1) that does strftime format checking
and Ulrich Drepper pointed out "we have version 2.0 near to a date of release and the strftime function was changed." Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de> comments in his web page on ISO 8601 (http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html) as follows: [Unfortunately, the current version of the C programming language standard provides in the strftime() function no means to generate the ISO 8601 week notation. A required extension would be four new formatting codes: for the year of the week to which the specified day belongs (both 2-digit and 4-digit), for the number of the week between 01 and 53, and for the day of the week between 1 (Monday) and 7 (Sunday). ... Does c-common.c and/or the strftime in version 2.0 of glibc address these points? - Jim Van Zandt
Date: Mon, 19 Aug 1996 21:58:22 -0400 From: Jim Van Zandt <jrv@vanzandt.mv.com> Does c-common.c and/or the strftime in version 2.0 of glibc address these points [about ISO 8601 week notation]? glibc 2.0 strftime doesn't. I am preparing a fix along the lines of the tz strftime. The fix will also make GNU strftime comply with Posix.2 section 4.15.4, and fix a few other bugs that I've discovered by code inspection (e.g. sometimes it returns 0 when it shouldn't, and it assumes 32-bit time_t's in a place or two). Ideally c-common.c would match the fixed version....
Date: Mon, 19 Aug 1996 21:58:22 -0400 From: Jim Van Zandt <jrv@vanzandt.mv.com> Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de> comments: Unfortunately, the current version of the C programming language standard provides in the strftime() function no means to generate the ISO 8601 week notation.... Does c-common.c and/or the strftime in version 2.0 of glibc address these points? Recent betas of the glibc strftime have support for the following formats, with the same meaning as the tz strftime.c: %G ISO 8601 4-digit year %g ISO 8601 2-digit year %V ISO 8601 2-digit week %u ISO 8601 1-digit weekday The next public glibc release should have this. The tz patch for c-common.c (understandably) hasn't caught up with this yet.
participants (3)
-
ado -
Jim Van Zandt -
Paul Eggert