/Zephyr-latest/tests/unit/timeutil/ |
D | test_s32.c | 22 .tm_year = 69, 34 .tm_year = 70, 46 .tm_year = 117, 63 .tm_year = 1, 75 .tm_year = 138, 89 .tm_year = 71, 101 .tm_year = 72, 113 .tm_year = 72, 125 .tm_year = 72, 137 .tm_year = 72, [all …]
|
D | test_s64.c | 23 .tm_year = 1, 35 .tm_year = 1, 47 .tm_year = 138, 59 .tm_year = 2099, 71 .tm_year = 2100, 84 .tm_year = -1, 96 .tm_year = 0, 108 .tm_year = 0, 120 .tm_year = 0, 132 .tm_year = 0, [all …]
|
D | main.c | 23 zassert_equal(tm.tm_year, tp->tm.tm_year, in timeutil_check() 25 tp->civil, tm.tm_year, tp->tm.tm_year); in timeutil_check()
|
/Zephyr-latest/drivers/rtc/ |
D | rtc_ambiq.c | 46 atm->ui32Century = ((tm->tm_year <= 99) || (tm->tm_year >= 200)); in rtc_time_to_ambiq_time_set() 48 atm->ui32CenturyBit = ((tm->tm_year > 99) && (tm->tm_year < 200)); in rtc_time_to_ambiq_time_set() 50 atm->ui32Year = tm->tm_year; in rtc_time_to_ambiq_time_set() 51 if (tm->tm_year > 99) { in rtc_time_to_ambiq_time_set() 52 atm->ui32Year = tm->tm_year % 100; in rtc_time_to_ambiq_time_set() 74 tm->tm_year = atm->ui32Year; in ambiq_time_to_rtc_time_set() 77 tm->tm_year += 100; in ambiq_time_to_rtc_time_set() 79 tm->tm_year += 200; in ambiq_time_to_rtc_time_set() 83 tm->tm_year += 200; in ambiq_time_to_rtc_time_set() 85 tm->tm_year += 100; in ambiq_time_to_rtc_time_set() [all …]
|
D | rtc_ds1307.c | 57 tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_wday, tm->tm_hour, tm->tm_min, in ds1307_set_time() 66 regs[6] = bin2bcd((tm->tm_year % 100)); in ds1307_set_time() 96 timeptr->tm_year = bcd2bin(regs[6] & YEAR_BITS); in ds1307_get_time() 97 timeptr->tm_year = timeptr->tm_year + 100; in ds1307_get_time() 112 timeptr->tm_year, timeptr->tm_mon, timeptr->tm_mday, timeptr->tm_wday, in ds1307_get_time()
|
D | rtc_utils.c | 38 if ((mask & RTC_ALARM_TIME_MASK_YEAR) && (timeptr->tm_year < 0 || timeptr->tm_year > 199)) { in rtc_utils_validate_rtc_time()
|
D | rtc_rpi_pico.c | 104 if (timeptr->tm_year + TM_YEAR_REF > RP2040_RTC_YEAR_MAX) { in rtc_rpi_pico_set_time() 115 .year = timeptr->tm_year + TM_YEAR_REF, in rtc_rpi_pico_set_time() 148 timeptr->tm_year = dt.year - TM_YEAR_REF; in rtc_rpi_pico_get_time() 210 ((alarm->tm_year + TM_YEAR_REF) << RTC_IRQ_SETUP_0_YEAR_LSB)); in rtc_rpi_pico_alarm_set_time()
|
D | rtc_emul.c | 64 if ((datetime->tm_year % 400 == 0) || in rtc_emul_is_leap_year() 65 (((datetime->tm_year % 100) > 0) && ((datetime->tm_year % 4) == 0))) { in rtc_emul_is_leap_year() 141 datetime->tm_year++; in rtc_emul_increment_tm()
|
D | rtc_mc146818.c | 166 if (timeptr->tm_year - 70 < MIN_YEAR_DIFF || timeptr->tm_year - 70 > MAX_YEAR_DIFF) { in rtc_mc146818_validate_time() 196 year = (1900 + timeptr->tm_year) % 100; in rtc_mc146818_set_time() 197 cent = (1900 + timeptr->tm_year) / 100; in rtc_mc146818_set_time() 250 timeptr->tm_year = 100 * (int)cent + year - 1900; in rtc_mc146818_get_time()
|
D | rtc_nxp_irtc.c | 73 int calc_year = timeptr->tm_year - RTC_NXP_IRTC_YEAR_OFFSET; in nxp_irtc_set_time() 115 timeptr->tm_year = (int8_t)RTC_NXP_GET_REG_FIELD(irtc_reg, YEARMON, YROFST) + in nxp_irtc_get_time() 185 RTC_ALM_YEARMON_ALM_YEAR(timeptr->tm_year - RTC_NXP_IRTC_YEAR_OFFSET); in nxp_irtc_alarm_set_time() 252 timeptr->tm_year = (int8_t)RTC_NXP_GET_REG_FIELD(irtc_reg, YEARMON, YROFST) + in nxp_irtc_alarm_get_time()
|
D | rtc_pcf8523.c | 351 if (timeptr->tm_year < PCF8523_YEARS_OFFSET || in pcf8523_set_time() 352 timeptr->tm_year > PCF8523_YEARS_OFFSET + 99) { in pcf8523_set_time() 366 timeptr->tm_year, timeptr->tm_mon, timeptr->tm_mday, timeptr->tm_wday, in pcf8523_set_time() 375 regs[6] = bin2bcd(timeptr->tm_year - PCF8523_YEARS_OFFSET) & PCF8523_YEARS_MASK; in pcf8523_set_time() 423 timeptr->tm_year = bcd2bin(regs[9] & PCF8523_YEARS_MASK) + PCF8523_YEARS_OFFSET; in pcf8523_get_time() 429 timeptr->tm_year, timeptr->tm_mon, timeptr->tm_mday, timeptr->tm_wday, in pcf8523_get_time() 490 timeptr->tm_year, timeptr->tm_mon, timeptr->tm_mday, timeptr->tm_hour, in pcf8523_alarm_set_time() 538 timeptr->tm_year, timeptr->tm_mon, timeptr->tm_mday, timeptr->tm_hour, in pcf8523_alarm_get_time()
|
D | rtc_shell.c | 70 tm_time->tm_year = atoi(year) - 1900; in consume_date() 213 shell_print(sh, "%04d-%02d-%02dT%02d:%02d:%02d.%03d", rtctime.tm_year + 1900, in cmd_get()
|
/Zephyr-latest/subsys/bluetooth/services/ |
D | cts.c | 41 date_time.tm_year = sys_le16_to_cpu(ct_time->year); /* year (little endian) */ in bt_cts_time_to_unix_ms() 42 date_time.tm_year -= TIME_UTILS_BASE_YEAR; in bt_cts_time_to_unix_ms() 50 LOG_DBG("CTS Write Time: %d/%d/%d %d:%d:%d", date_time.tm_year, date_time.tm_mon, in bt_cts_time_to_unix_ms() 82 date_time.tm_year += TIME_UTILS_BASE_YEAR; in bt_cts_time_from_unix_ms() 84 LOG_DBG("CTS Read Time: %d/%d/%d %d:%d:%d", date_time.tm_year, date_time.tm_mon, in bt_cts_time_from_unix_ms() 91 ct_time->year = sys_cpu_to_le16(date_time.tm_year); in bt_cts_time_from_unix_ms()
|
/Zephyr-latest/samples/drivers/rtc/src/ |
D | main.c | 18 .tm_year = 2024 - 1900, in set_date_time() 45 printk("RTC date and time: %04d-%02d-%02d %02d:%02d:%02d\n", tm.tm_year + 1900, in get_date_time()
|
/Zephyr-latest/tests/drivers/rtc/rtc_api/src/ |
D | test_alarm.c | 28 .tm_year = 121, 42 .tm_year = 121, 55 .tm_year = 8000, 157 zassert_equal(alarm_time_get.tm_year, test_alarm_time_set.tm_year, in ZTEST()
|
D | test_time.c | 52 zassert_true((datetime_get.tm_year > 124) && (datetime_get.tm_year < 127), in ZTEST()
|
D | test_y2k.c | 61 zassert_equal(rtm[Y2K].tm_year + 1900, 2000, "wrong year: %d", rtm[Y2K].tm_year + 1900); in ZTEST()
|
D | test_alarm_callback.c | 32 .tm_year = 121, 46 .tm_year = 121,
|
/Zephyr-latest/tests/drivers/rtc/rtc_api_helpers/src/ |
D | test_rtc_time_to_tm.c | 28 zassert_equal(offsetof(struct rtc_time, tm_year), offsetof(struct tm, tm_year), in ZTEST()
|
/Zephyr-latest/tests/drivers/rtc/rtc_utils/src/ |
D | test_rtc_utils.c | 20 .tm_year = 8000, in ZTEST()
|
/Zephyr-latest/tests/subsys/fs/fat_fs_api/src/ |
D | main.c | 24 return (DWORD)(cal->tm_year - 80) << 25 | (DWORD)(cal->tm_mon + 1) << 21 | in get_fattime()
|
/Zephyr-latest/lib/libc/common/source/time/ |
D | asctime.c | 35 DATE_TM_YEAR_BASE + tp->tm_year); in asctime_impl()
|
/Zephyr-latest/lib/libc/minimal/include/ |
D | time.h | 30 int tm_year; member
|
/Zephyr-latest/subsys/shell/modules/ |
D | date_service.c | 30 t->tm_year + 1900, in date_print() 75 t->tm_year = year - 1900; in get_y_m_d()
|
/Zephyr-latest/tests/drivers/rtc/shell/src/ |
D | main.c | 61 get_time_mock.rtc.tm_year = 2023 - 1900; /* rtc_time year offset */ in configure_get_time_mock() 79 zassert_equal(year, rtctime->tm_year + 1900, "Year mismatch"); in assert_set_time()
|