mirror of https://github.com/leahneukirchen/mblaze
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
231 B
C
16 lines
231 B
C
8 years ago
|
#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;
|
||
|
}
|