Lines Matching refs:time
91 static struct rtc_time time = { in set_magic_time() local
103 time.tm_year = (n % 100); in set_magic_time()
105 time.tm_mon = (n % 12); in set_magic_time()
107 time.tm_mday = (n % 28) + 1; in set_magic_time()
109 time.tm_hour = (n % 24); in set_magic_time()
111 time.tm_min = (n % 20) * 3; in set_magic_time()
113 mc146818_set_time(&time); in set_magic_time()
120 struct rtc_time time; in read_magic_time() local
123 if (mc146818_get_time(&time, 1000) < 0) { in read_magic_time()
128 pr_info("RTC time: %ptRt, date: %ptRd\n", &time, &time); in read_magic_time()
129 val = time.tm_year; /* 100 years */ in read_magic_time()
132 val += time.tm_mon * 100; /* 12 months */ in read_magic_time()
133 val += (time.tm_mday-1) * 100 * 12; /* 28 month-days */ in read_magic_time()
134 val += time.tm_hour * 100 * 12 * 28; /* 24 hours */ in read_magic_time()
135 val += (time.tm_min / 3) * 100 * 12 * 28 * 24; /* 20 3-minute intervals */ in read_magic_time()