1 2 3 4 5 6 7 8 9 10
#include <time.h> #include <sys/time.h> char * ctime_r(const time_t *t, char *buf) { struct tm tm; return asctime_r(localtime_r(t, &tm), buf); }