From: Jim Meyering Date: Sun, 12 Nov 2000 10:02:29 +0000 (+0000) Subject: (show_date): Add a comment explaining why the X-Git-Tag: FILEUTILS-4_0_33~127 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=8fc17df6789e8cbd3080464df48e32c089983e7c;p=thirdparty%2Fcoreutils.git (show_date): Add a comment explaining why the format string must not be translatable via _(). From Paul Eggert. --- diff --git a/src/date.c b/src/date.c index 23a2982862..b521d661d9 100644 --- a/src/date.c +++ b/src/date.c @@ -461,6 +461,13 @@ show_date (const char *format, time_t when) else { char *date_fmt = DATE_FMT_LANGINFO (); + /* Do not wrap the following literal format string with _(...). + For example, suppose LC_ALL is unset, LC_TIME="POSIX", + and LANG="ko_KR". In that case, POSIX.2 says that LC_TIME + determines the format and contents of date and time strings + written by date, which means "date" must generate output + using the POSIX locale; but adding _() would cause "date" + to use a Korean translation of the format. */ format = *date_fmt ? date_fmt : "%a %b %e %H:%M:%S %Z %Y"; } }