localtime_r converts a time_t value into broken-down local time, storing the result in caller-provided struct tm storage. Its local-time interpretation distinguishes it from gmtime_r, which produces UTC. section 8.6
Interface shape
struct tm *localtime_r(const time_t *timer, struct tm *buf);\n\nThe input points to a time_t value; buf receives the broken-down local-time result. The paired conversion localtime_r/mktime should normally be inverse operations. section 8.6
time_t timegm(struct tm *timeptr); struct tm *gmtime_r(const time_t *timer, struct tm *buf); struct tm *localtime_r(const time_t *timer, struct tm *buf);
Compare localtime_r with gmtime_r and timegm through their declarations. section 8.6
