utime2me.c
This small program is used to convert Unix time to local time.
#include <stdio.h>
#include <time.h>
void main(int argc, char **argv)
{
time_t t = atoi(argv[1]);
printf("%sn",ctime(&t));
}
Compile with:
$ gcc -o utime2me utime2me.c
Usage is as follows:
$ ./utime2me <utime>
$ ./utime2me 1186942177
Sun Aug 12 14:09:37 2007

No comments yet. Be the first.
Leave a reply