Lines Matching refs:hour
142 int hour, year; in atari_mste_hwclk() local
157 hour = t->tm_hour; in atari_mste_hwclk()
159 if (hour > 11) in atari_mste_hwclk()
160 hour += 20 - 12; in atari_mste_hwclk()
161 if (hour == 0 || hour == 20) in atari_mste_hwclk()
162 hour += 12; in atari_mste_hwclk()
164 val.hr_ones = hour % 10; in atari_mste_hwclk()
165 val.hr_tens = hour / 10; in atari_mste_hwclk()
183 hour = val.hr_ones + val.hr_tens * 10; in atari_mste_hwclk()
185 if (hour == 12 || hour == 12 + 20) in atari_mste_hwclk()
186 hour -= 12; in atari_mste_hwclk()
187 if (hour >= 20) in atari_mste_hwclk()
188 hour += 12 - 20; in atari_mste_hwclk()
190 t->tm_hour = hour; in atari_mste_hwclk()
201 int sec=0, min=0, hour=0, day=0, mon=0, year=0, wday=0; in atari_tt_hwclk() local
214 hour = t->tm_hour; in atari_tt_hwclk()
221 if (hour > 11) { in atari_tt_hwclk()
223 if (hour != 12) in atari_tt_hwclk()
224 hour -= 12; in atari_tt_hwclk()
226 else if (hour == 0) in atari_tt_hwclk()
227 hour = 12; in atari_tt_hwclk()
233 hour = bin2bcd(hour); in atari_tt_hwclk()
266 hour = RTC_READ( RTC_HOURS ); in atari_tt_hwclk()
275 RTC_WRITE( RTC_HOURS, hour + pm); in atari_tt_hwclk()
287 if (hour & 0x80) { in atari_tt_hwclk()
288 hour &= ~0x80; in atari_tt_hwclk()
295 hour = bcd2bin(hour); in atari_tt_hwclk()
303 if (!pm && hour == 12) in atari_tt_hwclk()
304 hour = 0; in atari_tt_hwclk()
305 else if (pm && hour != 12) in atari_tt_hwclk()
306 hour += 12; in atari_tt_hwclk()
311 t->tm_hour = hour; in atari_tt_hwclk()