| /netbsd/src/external/bsd/ntp/dist/tests/libntp/ |
| D | clocktime.c | 60 const int yday=175, hour=12, minute=50, second=0, tzoff=0; in test_CurrentYear() local 65 TEST_ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, in test_CurrentYear() 86 const int yday=175, hour=12, minute=0, second=0, tzoff=0; in test_CurrentYearFuzz() local 91 TEST_ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, in test_CurrentYearFuzz() 110 const int yday=175, hour=4, minute=0, second=0, tzoff=8; in test_TimeZoneOffset() local 115 TEST_ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp, in test_TimeZoneOffset() 131 const int yday=2, hour=11, minute=0, second=0, tzoff=0; in test_WrongYearStart() local 136 TEST_ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp, in test_WrongYearStart() 152 const int yday=365, hour=23, minute=0, second=0, tzoff=0; in test_PreviousYear() local 157 TEST_ASSERT_TRUE(clocktime(yday, hour, minute, second, tzoff, timestamp, in test_PreviousYear() [all …]
|
| D | calendar.c | 108 (u_int)cal->hour, (u_int)cal->minute, (u_int)cal->second); in CalendarFromCalToString() 120 (u_int)iso->hour, (u_int)iso->minute, (u_int)iso->second); in CalendarFromIsoToString() 134 expected->hour == actual->hour && in IsEqualCal() 159 expected->hour == actual->hour && in IsEqualIso() 245 jd->hour = (uint8_t)H; in strToCal() 548 date.hour = date.minute = date.second = 0; in test_RoundTripYearStart() 568 date.hour = date.minute = date.second = 0; in test_RoundTripMonthStart() 587 date.hour = date.minute = date.second = 0; in test_RoundTripWeekStart() 607 date.hour = date.minute = date.second = 0; in test_RoundTripDayStart() 723 TEST_ASSERT_MESSAGE((days==-1 && cal.hour==0 && cal.minute==0 && cal.second==0), in test_DaySecToDate() [all …]
|
| /netbsd/src/usr.bin/at/ |
| D | parsetime.c | 362 int hour, minute; in tod() local 366 hour = atoi(sc_token); in tod() 378 minute = hour % 100; in tod() 379 hour = hour / 100; in tod() 389 if (hour > 12) in tod() 393 if (hour != 12) /* 12:xx PM is 12:xx, not 24:xx */ in tod() 394 hour += 12; in tod() 396 if (hour == 12) /* 12:xx AM is 00:xx, not 12:xx */ in tod() 397 hour = 0; in tod() 400 } else if (hour > 23) in tod() [all …]
|
| /netbsd/src/external/bsd/ntp/dist/util/ |
| D | tg.c | 265 int minute, hour, day, year; in main() local 314 &hour, &minute); in main() 357 hour = tm->tm_hour; in main() 378 year, day, hour, minute, second, tone); in main() 380 year / 10, day, hour, minute, year % 10); in main() 395 0, year, day, hour, minute, second); in main() 416 hour++; in main() 418 if (hour >= 24) { in main() 419 hour = 0; in main() 438 day, hour, minute, year % 10); in main() [all …]
|
| /netbsd/src/sys/dev/i2c/ |
| D | r2025.c | 114 int hour; in r2025rtc_gettime_ymdhms() local 134 hour = bcdtobin(bcd[R2025_REG_HOUR] & R2025_REG_HOUR_MASK); in r2025rtc_gettime_ymdhms() 136 dt->dt_hour = hour; in r2025rtc_gettime_ymdhms() 138 if (hour == 12) { in r2025rtc_gettime_ymdhms() 140 } else if (hour == 32) { in r2025rtc_gettime_ymdhms() 142 } else if (hour > 13) { in r2025rtc_gettime_ymdhms() 143 dt->dt_hour = (hour - 8); in r2025rtc_gettime_ymdhms() 145 dt->dt_hour = hour; in r2025rtc_gettime_ymdhms()
|
| D | em3027.c | 71 uint8_t hour; member 400 if (w.hour & EM3027_WATCH_HOUR_S12) { in em3027rtc_gettime() 401 const int pm = w.hour & EM3027_WATCH_HOUR_PM; in em3027rtc_gettime() 404 w.hour &= ~(EM3027_WATCH_HOUR_S12 | EM3027_WATCH_HOUR_PM); in em3027rtc_gettime() 405 hr = bcdtobin(w.hour); in em3027rtc_gettime() 414 dt->dt_hour = bcdtobin(w.hour); in em3027rtc_gettime() 435 w.hour = bintobcd(dt->dt_hour); in em3027rtc_settime()
|
| /netbsd/src/sys/arch/hp300/stand/common/ |
| D | clock.c | 99 int year, month, day, hour, min, sec; in clock_to_gmt() local 107 hour = mc_read(MC_HOUR); in clock_to_gmt() 121 hour = ((bbc_registers[5] & 0x03) * 10) + bbc_registers[4]; in clock_to_gmt() 132 year, month, day, hour, min, sec); in clock_to_gmt() 135 range_test(hour, 0, 23); in clock_to_gmt() 150 tmp = ((tmp * 24 + hour) * 60 + min) * 60 + sec; in clock_to_gmt()
|
| /netbsd/src/sys/arch/mvme68k/stand/libsa/ |
| D | chiptotime.c | 21 chiptotime(int sec, int min, int hour, int day, int mon, int year) in chiptotime() argument 27 hour = bcdtobin(hour); in chiptotime() 44 return days * SECS_PER_DAY + hour * SECS_PER_HOUR in chiptotime()
|
| D | clock.c | 24 chiptotime(int sec, int min, int hour, int day, int mon, int year) in chiptotime() argument 30 hour = bcdtobin(hour); in chiptotime() 47 return days * SECS_PER_DAY + hour * SECS_PER_HOUR in chiptotime()
|
| /netbsd/src/external/bsd/ntp/dist/ntpd/ |
| D | refclock_fg.c | 286 pp->hour = BP1(6)*10 + BP2(6); in fg_receive() 288 pp->hour = BP1(5)*10 + BP2(5); in fg_receive() 290 if ((up->y2kwarn > 10) && (pp->hour == 10)) { in fg_receive() 296 pp->hour = BP1(5)*10 + BP2(5); in fg_receive() 303 if ((pp->hour == 10) && (pp->minute == 10)) { in fg_receive() 308 "%d %d %d %d %d", pp->year, pp->day, pp->hour, in fg_receive() 316 pp->year, pp->day, pp->hour, pp->minute, pp->second); in fg_receive()
|
| D | refclock_hpgps.c | 418 &pp->year, &month, &day, &pp->hour, &pp->minute, &pp->second, in hpgps_receive() 495 pp->hour -= up->tzhour; in hpgps_receive() 499 pp->hour--; in hpgps_receive() 503 pp->hour++; in hpgps_receive() 505 if (pp->hour < 0) { in hpgps_receive() 506 pp->hour += 24; in hpgps_receive() 517 if (pp->hour > 23) { in hpgps_receive() 518 pp->hour -= 24; in hpgps_receive()
|
| D | refclock_mx4200.c | 885 pp->year, pp->day, pp->hour, pp->minute, pp->second, in mx4200_receive() 958 int hour, minute, second, leapsec_warn; in mx4200_parse_t() local 968 &hour, &minute, &second, &time_sync, &op_mode, in mx4200_parse_t() 997 if (second > 60 || minute > 59 || hour > 23 || in mx4200_parse_t() 998 second < 0 || minute < 0 || hour < 0) { in mx4200_parse_t() 1001 hour, minute, second); in mx4200_parse_t() 1011 hour, minute, second); in mx4200_parse_t() 1040 hour--; in mx4200_parse_t() 1041 if (hour < 0) { in mx4200_parse_t() 1042 hour = 23; in mx4200_parse_t() [all …]
|
| D | refclock_datum.c | 141 int hour; /* hour */ member 563 datum_pts->hour = 10*((datum_pts->retbuf[2] & 0x30)>>4) + in datum_pts_receive() 582 datum_pts->hour, in datum_pts_receive() 624 datum_pts->hour, in datum_pts_receive() 665 datum_pts->hour, in datum_pts_receive() 776 datum_pts->hour, in datum_pts_receive()
|
| /netbsd/src/sys/arch/sbmips/sbmips/ |
| D | rtc.c | 186 uint8_t hour, year, y2k; in xirtc_gettime() local 199 hour = READRTC(sc, X1241REG_HR); in xirtc_gettime() 200 ymdhms->dt_hour = bcdtobin(hour & ~X1241REG_HR_MIL); in xirtc_gettime() 264 uint8_t hour; in strtc_settime() local 268 hour = bintobcd(ymdhms->dt_hour); in strtc_settime() 270 hour |= M41T81_HOUR_CB | M41T81_HOUR_CEB; in strtc_settime() 275 WRITERTC(sc, M41T81_HOUR, hour); in strtc_settime() 289 uint8_t hour; in strtc_gettime() local 295 hour = READRTC(sc, M41T81_HOUR & M41T81_HOUR_MASK); in strtc_gettime() 296 ymdhms->dt_hour = bcdtobin(hour & M41T81_HOUR_MASK); in strtc_gettime() [all …]
|
| /netbsd/src/sys/arch/x68k/stand/libsa/ |
| D | clock.c | 48 int sec, min, hour, day, mon, year; in getsecs() local 58 hour = ((val & 0x00ff0000) >> 16); in getsecs() 65 if (hour > 23 || min > 59 || sec > 59) in getsecs() 76 return (days * SECS_PER_DAY) + (hour * SECS_PER_HOUR) in getsecs()
|
| /netbsd/src/sys/arch/mvmeppc/stand/libsa/ |
| D | clock.c | 27 chiptotime(int sec, int min, int hour, int day, int mon, int year) in chiptotime() argument 33 hour = bcdtobin(hour); in chiptotime() 50 return days * SECS_PER_DAY + hour * SECS_PER_HOUR in chiptotime()
|
| /netbsd/src/external/bsd/kyua-cli/dist/utils/ |
| D | datetime.cpp | 222 const int day, const int hour, in from_values() argument 229 PRE(hour >= 0 && hour <= 23); in from_values() 250 timedata.tm_hour = hour; in from_values() 331 const int day, const int hour, in set_mock_now() argument 335 mock_now = timestamp::from_values(year, month, day, hour, minute, second, in set_mock_now()
|
| /netbsd/src/sys/arch/mac68k/mac68k/ |
| D | pram.c | 64 long year, month, day, hour, minute, seconds, i, dayperyear; in convtime() local 69 hour = 0; in convtime() 105 hour++; in convtime() 119 monstr[month], day, year, hour, minute, seconds); in convtime()
|
| /netbsd/src/external/bsd/ntp/dist/parseutil/ |
| D | testdcf.c | 62 long hour; member 247 clock_time->hour = ext_bf(buffer, DCF_H10); in convert_rawdcf() 248 clock_time->hour = TIMES10(clock_time->hour) + ext_bf(buffer, DCF_H1); in convert_rawdcf() 419 clock_time.hour = 0; in main() 460 clock_time.hour = 0; in main() 494 … (int)clock_time.hour, (int)clock_time.minute, (int)i, (int)clock_time.day, (int)clock_time.month, in main()
|
| /netbsd/src/sys/arch/mvme68k/stand/sboot/ |
| D | clock.c | 105 int sec, min, hour, day, mon, year; in time() local 110 hour = cl->cl_hour; in time() 115 return chiptotime(sec, min, hour, day, mon, year); in time()
|
| /netbsd/src/sys/arch/powerpc/powerpc/ |
| D | rtas.c | 268 int status, year, month, day, hour, minute, second, nanosecond; in rtas_todr_gettime_ymdhms() local 274 &month, &day, &hour, &minute, &second, &nanosecond) < 0) in rtas_todr_gettime_ymdhms() 280 t->dt_hour = hour; in rtas_todr_gettime_ymdhms() 290 int status, year, month, day, hour, minute, second, nanosecond; in rtas_todr_settime_ymdhms() local 298 hour = t->dt_hour; in rtas_todr_settime_ymdhms() 304 day, hour, minute, second, nanosecond, &status) < 0) in rtas_todr_settime_ymdhms()
|
| /netbsd/src/sys/arch/landisk/stand/boot/ |
| D | getsecs.c | 196 uint32_t sec, min, hour, day; in getsecs() local 206 hour = rtc_read(RS5C313_HOUR1); in getsecs() 207 hour += rtc_read(RS5C313_HOUR10) * 10; in getsecs() 219 secs += hour * 60 * 60; in getsecs()
|
| /netbsd/src/lib/libc/time/ |
| D | asctime.c | 97 int year, mday, hour, min, sec; in asctime_r() local 118 hour = timeptr->tm_hour; in asctime_r() 141 wn, mn, mday, hour, min, sec, in asctime_r() 145 wn, mn, mday, hour, min, sec, in asctime_r()
|
| /netbsd/src/external/bsd/wpa/dist/src/utils/ |
| D | os_win32.c | 62 int os_mktime(int year, int month, int day, int hour, int min, int sec, in os_mktime() argument 70 hour < 0 || hour > 23 || min < 0 || min > 59 || sec < 0 || in os_mktime() 78 tm.tm_hour = hour; in os_mktime() 112 tm->hour = tm2->tm_hour; in os_gmtime()
|
| /netbsd/src/crypto/dist/ipsec-tools/misc/ |
| D | cvs2cl.pl | 422 my (undef,$min,$hour,$mday,$mon,$year,$wday) 803 my (undef,$min,$hour,$mday,$mon,$year,$wday) 811 $year+1900, $mon+1, $mday, $hour, $min); 1254 my (undef,$min,$hour,$mday,$mon,$year,$wday) 1714 my ($year, $mday, $mon, $wday, $hour, $min); 1717 ($year, $mday, $mon, $wday, $hour, $min) = @_; 1720 (undef, $min, $hour, $mday, $mon, $year, $wday) = 1731 my $ftime = $self->ftime($hour, $min); 1765 my ($hour, $min); 1768 ($hour, $min) = @_; [all …]
|