From 954af9179665457b40453a0417ddf5b3949a0449 Mon Sep 17 00:00:00 2001 From: Ian C Date: Sun, 4 Mar 2007 18:35:36 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r2, which included commits to RCS files with non-trunk default branches. --- ctime.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ctime.c (limited to 'ctime.c') diff --git a/ctime.c b/ctime.c new file mode 100644 index 0000000..5ee8451 --- /dev/null +++ b/ctime.c @@ -0,0 +1,17 @@ +#include +#include +#include + +int main(int argc, char *argv[]) +{ + time_t t; + + if (argc>1) + t=(time_t)strtol(argv[1],NULL,0); + else + t=time(NULL); + + printf("%s",ctime(&t)); + + return 0; +} -- cgit v1.2.3