localtime.c 199 B

123456789101112
  1. #include <time.h>
  2. #include "__time.h"
  3. struct tm *localtime(const time_t *t)
  4. {
  5. static struct tm tm;
  6. __tzset();
  7. __time_to_tm(*t - __timezone, &tm);
  8. tm.tm_isdst = -1;
  9. return __dst_adjust(&tm);
  10. }