]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(show_date) [--rfc-822]: Don't space-pad the day of the month.
authorJim Meyering <jim@meyering.net>
Sat, 18 Aug 2001 10:54:56 +0000 (10:54 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 18 Aug 2001 10:54:56 +0000 (10:54 +0000)
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.

src/date.c

index 64aeed4a2ad07e40bb3fdd09929928965bdf9188..3e75899d197e83b0b74366f70db29887c733595d 100644 (file)
@@ -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
     {