summary refs log tree commit diff
path: root/mdate.c
blob: fa2253ddf29f132c23c4f5f3dd94ee55bdff6d60 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#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;
}