From: GOTO Masanori <[EMAIL PROTECTED]> Date: Wed, 29 Mar 2000 03:19:45 +0900 The behavior of the default date command is defined: "%a %b %e %H:%M:%S %Z %Y" under locale == C. It, however, should change "%c". The reason is that POSIX or XPG said date command should print LC_TIME format. There must be some misunderstanding here. The latest official POSIX standard (POSIX.2-1992 section 4.15.6.1 page 243 line 3012) specifies "%a %b %e %H:%M:%S %Z %Y". And the latest POSIX.2 draft, dated 2000-02-29, hasn't changed in this area. "%c" can't be right since it omits the time zone in the POSIX locale, and "date" has always printed the time zone by default. In Solaris 8, "/usr/bin/date" is equivalent to "/usr/bin/date +%C"; perhaps this is what you're thinking of? Unfortunately, this violates POSIX.2, as POSIX.2 requires that %C expand to the century (currently 20). Solaris 8 /usr/xpg4/bin/date conforms to POSIX.2, as does GNU date. It would be nice for the GNU C library's strftime to have a format that expands to the current locale's output of "date". This would be an extension to the current glibc behavior. This was what Sun tried to do with %C. Clearly a different format string should be used, though. I suggest %+, as this is what the Olson time zone library uses (see ftp://elsie.nci.nih.gov/pub/). If glibc supported this extension, then GNU date could and should use it. I'll add bug-glibc to the CC: list to see whether they like this suggestion.
