Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #include <time.h> |
2 | |||||
3 | char *ctime(const time_t *t) | ||||
4 | { | ||||
Rich Felker | 5c10c33 | 2017-06-15 12:58:08 -0400 | [diff] [blame] | 5 | struct tm *tm = localtime(t); |
6 | if (!tm) return 0; | ||||
7 | return asctime(tm); | ||||
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 8 | } |