Lines Matching refs:tm
53 rk_timegm (struct tm *tm)
61 if (tm->tm_year < 0)
63 if (tm->tm_mon < 0 || tm->tm_mon > 11)
65 if (tm->tm_mday < 1 || tm->tm_mday > ndays[is_leap(tm->tm_year)][tm->tm_mon])
67 if (tm->tm_hour < 0 || tm->tm_hour > 23)
69 if (tm->tm_min < 0 || tm->tm_min > 59)
71 if (tm->tm_sec < 0 || tm->tm_sec > 59)
74 for (i = 70; i < tm->tm_year; ++i)
77 for (i = 0; i < tm->tm_mon; ++i)
78 res += ndays[is_leap(tm->tm_year)][i];
79 res += tm->tm_mday - 1;
81 res += tm->tm_hour;
83 res += tm->tm_min;
85 res += tm->tm_sec;