Home
last modified time | relevance | path

Searched refs:tm_year (Results 1 – 25 of 48) sorted by relevance

12

/Zephyr-latest/tests/unit/timeutil/
Dtest_s32.c22 .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 …]
Dtest_s64.c23 .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 …]
Dmain.c23 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/
Drtc_ambiq.c46 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 …]
Drtc_ds1307.c57 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()
Drtc_utils.c38 if ((mask & RTC_ALARM_TIME_MASK_YEAR) && (timeptr->tm_year < 0 || timeptr->tm_year > 199)) { in rtc_utils_validate_rtc_time()
Drtc_rpi_pico.c104 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()
Drtc_emul.c64 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()
Drtc_mc146818.c166 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()
Drtc_nxp_irtc.c73 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()
Drtc_pcf8523.c351 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()
Drtc_shell.c70 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/
Dcts.c41 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/
Dmain.c18 .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/
Dtest_alarm.c28 .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()
Dtest_time.c52 zassert_true((datetime_get.tm_year > 124) && (datetime_get.tm_year < 127), in ZTEST()
Dtest_y2k.c61 zassert_equal(rtm[Y2K].tm_year + 1900, 2000, "wrong year: %d", rtm[Y2K].tm_year + 1900); in ZTEST()
Dtest_alarm_callback.c32 .tm_year = 121,
46 .tm_year = 121,
/Zephyr-latest/tests/drivers/rtc/rtc_api_helpers/src/
Dtest_rtc_time_to_tm.c28 zassert_equal(offsetof(struct rtc_time, tm_year), offsetof(struct tm, tm_year), in ZTEST()
/Zephyr-latest/tests/drivers/rtc/rtc_utils/src/
Dtest_rtc_utils.c20 .tm_year = 8000, in ZTEST()
/Zephyr-latest/tests/subsys/fs/fat_fs_api/src/
Dmain.c24 return (DWORD)(cal->tm_year - 80) << 25 | (DWORD)(cal->tm_mon + 1) << 21 | in get_fattime()
/Zephyr-latest/lib/libc/common/source/time/
Dasctime.c35 DATE_TM_YEAR_BASE + tp->tm_year); in asctime_impl()
/Zephyr-latest/lib/libc/minimal/include/
Dtime.h30 int tm_year; member
/Zephyr-latest/subsys/shell/modules/
Ddate_service.c30 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/
Dmain.c61 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()

12