mblaze/mdate.c
Christian Neukirchen a350d1c731 mdate: style tweak
2016-09-01 15:40:39 +02:00

17 lines
231 B
C

#include <time.h>
#include <unistd.h>
int
main()
{
char buf[64];
time_t now = time(0);
ssize_t l = strftime(buf, sizeof buf,
"%a, %d %b %Y %T %z\n", localtime(&now));
if (write(1, buf, l) == l)
return 0;
return 1;
}