1 #include <time.h> 2 ctime(const time_t * t)3 char *ctime(const time_t *t) 4 { 5 struct tm *tm = localtime(t); 6 if (!tm) return 0; 7 return asctime(tm); 8 } 9