Lines Matching refs:tm
30 int rtc_calc_weekday(struct rtc_time *tm) in rtc_calc_weekday() argument
36 if (tm->tm_year < 1753) in rtc_calc_weekday()
38 last_year = tm->tm_year - 1; in rtc_calc_weekday()
49 if (tm->tm_year % 4 == 0 && in rtc_calc_weekday()
50 ((tm->tm_year % 100 != 0) || (tm->tm_year % 400 == 0)) && in rtc_calc_weekday()
51 tm->tm_mon > 2) { in rtc_calc_weekday()
58 day += last_year * 365 + leaps_to_date + month_offset[tm->tm_mon - 1] + in rtc_calc_weekday()
59 tm->tm_mday; in rtc_calc_weekday()
60 tm->tm_wday = day % 7; in rtc_calc_weekday()
81 unsigned long rtc_mktime(const struct rtc_time *tm) in rtc_mktime() argument
83 int mon = tm->tm_mon; in rtc_mktime()
84 int year = tm->tm_year; in rtc_mktime()
94 367 * mon / 12 + tm->tm_mday) + in rtc_mktime()
96 hours = days * 24 + tm->tm_hour; in rtc_mktime()
97 return (hours * 60 + tm->tm_min) * 60 + tm->tm_sec; in rtc_mktime()