Zephyr API 3.6.99
Loading...
Searching...
No Matches
rtc_time Struct Reference

Structure for storing date and time values with sub-second precision. More...

#include <rtc.h>

Data Fields

int tm_sec
 Seconds [0, 59].
 
int tm_min
 Minutes [0, 59].
 
int tm_hour
 Hours [0, 23].
 
int tm_mday
 Day of the month [1, 31].
 
int tm_mon
 Month [0, 11].
 
int tm_year
 Year - 1900.
 
int tm_wday
 Day of the week [0, 6] (Sunday = 0) (Unknown = -1)
 
int tm_yday
 Day of the year [0, 365] (Unknown = -1)
 
int tm_isdst
 Daylight saving time flag [-1] (Unknown = -1)
 
int tm_nsec
 Nanoseconds [0, 999999999] (Unknown = 0)
 

Detailed Description

Structure for storing date and time values with sub-second precision.

The structure is 1-1 mapped to the struct tm for the members tm_sec to tm_isdst making it compatible with the standard time library.

Note
Use rtc_time_to_tm() to safely cast from a rtc_time pointer to a tm pointer.

Field Documentation

◆ tm_hour

int rtc_time::tm_hour

Hours [0, 23].

◆ tm_isdst

int rtc_time::tm_isdst

Daylight saving time flag [-1] (Unknown = -1)

◆ tm_mday

int rtc_time::tm_mday

Day of the month [1, 31].

◆ tm_min

int rtc_time::tm_min

Minutes [0, 59].

◆ tm_mon

int rtc_time::tm_mon

Month [0, 11].

◆ tm_nsec

int rtc_time::tm_nsec

Nanoseconds [0, 999999999] (Unknown = 0)

◆ tm_sec

int rtc_time::tm_sec

Seconds [0, 59].

◆ tm_wday

int rtc_time::tm_wday

Day of the week [0, 6] (Sunday = 0) (Unknown = -1)

◆ tm_yday

int rtc_time::tm_yday

Day of the year [0, 365] (Unknown = -1)

◆ tm_year

int rtc_time::tm_year

Year - 1900.


The documentation for this struct was generated from the following file: