summaryrefslogtreecommitdiff
path: root/src/date.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-08-18 10:54:56 +0000
committerJim Meyering <jim@meyering.net>2001-08-18 10:54:56 +0000
commit88e4ad1d3673996f718ae70099105e67084cdbad (patch)
tree0681ac44bed144c4ad019cbeb456444746f076c1 /src/date.c
parent3e08e11574641bda38cde2c7368dfbe87bbda2bf (diff)
downloadcoreutils-88e4ad1d3673996f718ae70099105e67084cdbad.tar.xz
(show_date) [--rfc-822]: Don't space-pad the day of the month.
Set only LC_TYPE to the "C" locale. Setting LC_ALL is overkill, and would have unwanted side effects if there is an error message.
Diffstat (limited to 'src/date.c')
-rw-r--r--src/date.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/date.c b/src/date.c
index 64aeed4a2..3e75899d1 100644
--- a/src/date.c
+++ b/src/date.c
@@ -76,7 +76,7 @@ char *program_name;
/* If nonzero, display an ISO 8601 format date/time string */
static int iso_8601_format = 0;
-/* If non-zero, display time in RFC-822 format for mail or news. */
+/* If non-zero, display time in RFC-(2)822 format for mail or news. */
static int rfc_format = 0;
static struct option const long_options[] =
@@ -466,7 +466,7 @@ show_date (const char *format, time_t when)
RFC time format outside the continental United States and GMT. */
if (rfc_format)
- format = "%a, %_d %b %Y %H:%M:%S %z";
+ format = "%a, %d %b %Y %H:%M:%S %z";
else if (iso_8601_format)
format = iso_format_string[iso_8601_format - 1];
else
@@ -489,7 +489,7 @@ show_date (const char *format, time_t when)
}
if (rfc_format)
- setlocale (LC_ALL, "C");
+ setlocale (LC_TIME, "C");
do
{