summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-09-16 07:33:36 +0000
committerJim Meyering <jim@meyering.net>2005-09-16 07:33:36 +0000
commitd514933c67426ca4c5f179035baa852495fdd9e3 (patch)
treee0c64786c048de1332180efb334fbe51c984113d /src
parent4fa029bd7d87afa8c1d78b92af6cbae53cb164ec (diff)
downloadcoreutils-d514933c67426ca4c5f179035baa852495fdd9e3.tar.xz
Include fprintftime.h.
Don't include strftime.h or xanstrftime.h -- no longer needed. (show_date): Use fprintftime rather than xanstrftime.
Diffstat (limited to 'src')
-rw-r--r--src/date.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/date.c b/src/date.c
index 58fe96ea5..ebe63ac39 100644
--- a/src/date.c
+++ b/src/date.c
@@ -33,8 +33,7 @@
#include "inttostr.h"
#include "posixtm.h"
#include "quote.h"
-#include "strftime.h"
-#include "xanstrftime.h"
+#include "fprintftime.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "date"
@@ -549,16 +548,12 @@ show_date (const char *format, struct timespec when)
}
{
- char *out;
-
if (format == rfc_2822_format)
setlocale (LC_TIME, "C");
- out = xanstrftime (format, tm, 0, when.tv_nsec);
+ fprintftime (stdout, format, tm, 0, when.tv_nsec);
+ fputc ('\n', stdout);
if (format == rfc_2822_format)
setlocale (LC_TIME, "");
-
- puts (out);
- free (out);
}
return true;
}