void localtime_r(const time_t * timer, struct tm * timeptr) { time_t lt; int16_t dst; dst = -1; if (__dst_ptr) dst = __dst_ptr(timer, &__utc_offset); lt = *timer + __utc_offset; if (dst > 0) lt += dst; gmtime_r(<, timeptr); timeptr->tm_isdst = dst; }
time_t mktime(struct tm * timeptr) { time_t ret; ret = mk_gmtime(timeptr); if (timeptr->tm_isdst < 0) { if (__dst_ptr) timeptr->tm_isdst = __dst_ptr(&ret, &__utc_offset); } if (timeptr->tm_isdst > 0) ret -= timeptr->tm_isdst; ret -= __utc_offset; localtime_r(&ret, timeptr); return ret; }