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