|
PatchworkOS
|
#include "time_utils.h"Go to the source code of this file.
Functions | |
| void | _time_zone_init (void) |
| _time_zone_t * | _time_zone (void) |
| bool | _time_is_leap_year (int32_t year) |
| int32_t | _time_days_in_month (int32_t month, int32_t year) |
| void | _time_normalize (struct tm *timePtr) |
| void | _time_day_of_week (struct tm *timePtr) |
| void | _time_day_of_year (struct tm *timePtr) |
Variables | |
| _time_zone_t | timeZone |
| static const int32_t | daysInMonth [] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} |
| static const int32_t | cumulativeDays [] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334} |
| static const int32_t | cumulativeDaysLeap [] = {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335} |
| void _time_day_of_week | ( | struct tm * | timePtr | ) |
Definition at line 105 of file time_utils.c.
References tm::tm_mday, tm::tm_mon, tm::tm_wday, tm::tm_year, and y.
Referenced by mktime().
| void _time_day_of_year | ( | struct tm * | timePtr | ) |
Definition at line 124 of file time_utils.c.
References _time_is_leap_year(), cumulativeDays, cumulativeDaysLeap, tm::tm_mday, tm::tm_mon, tm::tm_yday, and tm::tm_year.
Referenced by mktime().
Definition at line 29 of file time_utils.c.
References _time_is_leap_year(), and daysInMonth.
Referenced by _time_normalize(), and localtime_r().
Definition at line 24 of file time_utils.c.
Referenced by _time_day_of_year(), _time_days_in_month(), localtime_r(), and mktime().
| void _time_normalize | ( | struct tm * | timePtr | ) |
Definition at line 38 of file time_utils.c.
References _time_days_in_month(), tm::tm_hour, tm::tm_mday, tm::tm_min, tm::tm_mon, tm::tm_sec, and tm::tm_year.
Referenced by mktime().
| _time_zone_t * _time_zone | ( | void | ) |
| void _time_zone_init | ( | void | ) |
Definition at line 5 of file time_utils.c.
References _time_zone_t::secondsOffset, and timeZone.
Referenced by _std_init().
|
static |
Definition at line 21 of file time_utils.c.
Referenced by _time_day_of_year().
|
static |
Definition at line 22 of file time_utils.c.
Referenced by _time_day_of_year().
|
static |
Definition at line 20 of file time_utils.c.
Referenced by _time_days_in_month().
| _time_zone_t timeZone |
Definition at line 3 of file time_utils.c.
Referenced by _time_zone(), _time_zone_init(), and localtime_r().