diff options
-rw-r--r-- | ctime.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -7,11 +7,15 @@ int main(int argc, char *argv[]) time_t t; if (argc>1) - t=(time_t)strtol(argv[1],NULL,0); + { + t = (time_t)strtoll(argv[1],NULL,0); + } else - t=time(NULL); + { + t = time(NULL); + } - printf("%s",ctime(&t)); + printf("%lld = %s",(long long)t, ctime(&t)); return 0; } |