Lines Matching refs:tm
5 * This file is a implementation for rtc set read,covert to tm functions
58 void tst_rtc_time_to_tm(long long time, struct rtc_time *tm)
68 tm->tm_wday = (days + 4) % 7;
78 tm->tm_year = year - 1900;
79 tm->tm_yday = days + 1;
89 tm->tm_mon = month;
90 tm->tm_mday = days + 1;
92 tm->tm_hour = secs / 3600;
93 secs -= tm->tm_hour * 3600;
94 tm->tm_min = secs / 60;
95 tm->tm_sec = secs - tm->tm_min * 60;
97 tm->tm_isdst = 0;
104 long long tst_rtc_tm_to_time(struct rtc_time *tm)
106 return tst_mktime(((unsigned int)tm->tm_year + 1900), tm->tm_mon + 1,
107 tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);