date: Fix default format string
From POSIX: When no formatting operand is specified, the output in the POSIX locale shall be equivalent to specifying: date "+%a %b %e %H:%M:%S %Z %Y"
This commit is contained in:
parent
6b950e436b
commit
09c2311b3a
2
date.c
2
date.c
@ -66,7 +66,7 @@ main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
struct tm *now;
|
struct tm *now;
|
||||||
time_t t;
|
time_t t;
|
||||||
char buf[BUFSIZ], *fmt = "%c";
|
char buf[BUFSIZ], *fmt = "%a %b %e %H:%M:%S %Z %Y";
|
||||||
|
|
||||||
t = time(NULL);
|
t = time(NULL);
|
||||||
if (t == -1)
|
if (t == -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user