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