Lines Matching refs:tm
719 struct rtc_time tm; in update_persistent_clock() local
724 to_tm(now.tv_sec + 1 + timezone_offset, &tm); in update_persistent_clock()
725 tm.tm_year -= 1900; in update_persistent_clock()
726 tm.tm_mon -= 1; in update_persistent_clock()
728 return ppc_md.set_rtc_time(&tm); in update_persistent_clock()
733 struct rtc_time tm; in __read_persistent_clock() local
753 ppc_md.get_rtc_time(&tm); in __read_persistent_clock()
755 ts->tv_sec = mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, in __read_persistent_clock()
756 tm.tm_hour, tm.tm_min, tm.tm_sec); in __read_persistent_clock()
1008 void GregorianDay(struct rtc_time * tm) in GregorianDay() argument
1015 lastYear = tm->tm_year - 1; in GregorianDay()
1028 day = tm->tm_mon > 2 && leapyear(tm->tm_year); in GregorianDay()
1030 day += lastYear*365 + leapsToDate + MonthOffset[tm->tm_mon-1] + in GregorianDay()
1031 tm->tm_mday; in GregorianDay()
1033 tm->tm_wday = day % 7; in GregorianDay()
1037 void to_tm(int tim, struct rtc_time * tm) in to_tm() argument
1046 tm->tm_hour = hms / 3600; in to_tm()
1047 tm->tm_min = (hms % 3600) / 60; in to_tm()
1048 tm->tm_sec = (hms % 3600) % 60; in to_tm()
1053 tm->tm_year = i; in to_tm()
1056 if (leapyear(tm->tm_year)) in to_tm()
1061 tm->tm_mon = i; in to_tm()
1064 tm->tm_mday = day + 1; in to_tm()
1069 GregorianDay(tm); in to_tm()