19 #ifndef HARDWARE_AVR_TIME_H 20 #define HARDWARE_AVR_TIME_H 49 memset(
this, 0,
sizeof(
tm));
52 tm(int8_t wday, int16_t year, int8_t mon, int8_t mday,
53 int8_t hour, int8_t min, int8_t sec) :
65 } __attribute__((packed));
140 char*
isotime_r(
const struct tm* tmptr,
char* buf);
148 #define ONE_HOUR 3600 151 #define ONE_DEGREE 3600 154 #define ONE_DAY 86400UL 157 #define UNIX_OFFSET 946684800UL 160 #define NTP_OFFSET 3155673600UL int8_t tm_mday
Day in Month [1-31].
int8_t tm_min
Minutes [0-59].
char * isotime_r(const struct tm *tmptr, char *buf)
tm(int8_t wday, int16_t year, int8_t mon, int8_t mday, int8_t hour, int8_t min, int8_t sec)
int16_t tm_yday
days since January 1 [0-365].
int16_t tm_isdst
Daylight Saving Time flag [-1/0/1].
int32_t difftime(time_t time1, time_t time0)
time_t mktime(struct tm *timeptr)
struct tm * localtime_r(const time_t *timer, struct tm *timeptr)
int16_t tm_year
Years since 1900.
time_t mk_gmtime(const struct tm *timeptr)
int8_t tm_sec
Seconds [0-60].
void set_dst(int(*)(const time_t *, int32_t *))
struct tm * gmtime_r(const time_t *timer, struct tm *timeptr)
int8_t tm_hour
Hours [0-23].
int8_t tm_wday
Days since Sunday [0-6].
int8_t tm_mon
0-11 Months since January [0-11].
uint8_t is_leap_year(int16_t year)