Lines Matching refs:tm
50 time_t timegm(struct tm *tm)
58 if (tm->tm_mon > 12 ||
59 tm->tm_mon < 0 ||
60 tm->tm_mday > 31 ||
61 tm->tm_min > 60 ||
62 tm->tm_sec > 60 ||
63 tm->tm_hour > 24) {
64 /* invalid tm structure */
68 for (i = 70; i < tm->tm_year; ++i)
71 for (i = 0; i < tm->tm_mon; ++i)
72 res += ndays[is_leap(tm->tm_year)][i];
73 res += tm->tm_mday - 1;
75 res += tm->tm_hour;
77 res += tm->tm_min;
79 res += tm->tm_sec;