Lines Matching +full:start +full:- +full:year

2  * QTest testcase for the M48T59 and M48T08 real-time clocks
11 * See the COPYING file in the top-level directory.
93 return -1; in tm_cmp()
104 printf("%04d-%02d-%02d %02d:%02d:%02d %+02ld\n",
105 tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
106 tm->tm_hour, tm->tm_min, tm->tm_sec, tm->tm_gmtoff);
112 int sec, min, hour, mday, mon, year; in cmos_get_date_time() local
121 year = cmos_read(s, RTC_YEAR); in cmos_get_date_time()
128 year = bcd2dec(year); in cmos_get_date_time()
133 date->tm_isdst = dummy.tm_isdst; in cmos_get_date_time()
134 date->tm_sec = sec; in cmos_get_date_time()
135 date->tm_min = min; in cmos_get_date_time()
136 date->tm_hour = hour; in cmos_get_date_time()
137 date->tm_mday = mday; in cmos_get_date_time()
138 date->tm_mon = mon - 1; in cmos_get_date_time()
139 date->tm_year = base_year + year - 1900; in cmos_get_date_time()
141 date->tm_gmtoff = 0; in cmos_get_date_time()
149 return qtest_initf("-M %s -rtc clock=vm", base_machine); in m48t59_qtest_start()
154 struct tm start, date[4], end; in bcd_check_time() local
174 gmtime_r(&ts, &start); in bcd_check_time()
194 if (!(tm_cmp(&start, datep) <= 0 && tm_cmp(datep, &end) <= 0)) { in bcd_check_time()
198 start.tm_isdst = datep->tm_isdst; in bcd_check_time()
201 start_s = (long)mktime(&start); in bcd_check_time()
203 diff = start_s - date_s; in bcd_check_time()
204 g_test_message("RTC is %ld second(s) behind wall-clock", diff); in bcd_check_time()
206 diff = date_s - start_s; in bcd_check_time()
207 g_test_message("RTC is %ld second(s) ahead of wall-clock", diff); in bcd_check_time()
245 /* Note: For sparc64, we'd need to map-in the PCI bridge memory first */ in base_setup()
248 base_machine = "SS-5"; in base_setup()
267 /* Do not run this in timing-sensitive environments */ in main()
268 qtest_add_func("/rtc/bcd-check-time", bcd_check_time); in main()
270 qtest_add_func("/rtc/fuzz-registers", fuzz_registers); in main()