PatchworkOS
Loading...
Searching...
No Matches
time_utils.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <time.h>

Go to the source code of this file.

Data Structures

struct  _time_zone_t
 

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)
 

Function Documentation

◆ _time_day_of_week()

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().

◆ _time_day_of_year()

void _time_day_of_year ( struct tm timePtr)

◆ _time_days_in_month()

int32_t _time_days_in_month ( int32_t  month,
int32_t  year 
)

Definition at line 29 of file time_utils.c.

References _time_is_leap_year(), and daysInMonth.

Referenced by _time_normalize(), and localtime_r().

◆ _time_is_leap_year()

bool _time_is_leap_year ( int32_t  year)

Definition at line 24 of file time_utils.c.

Referenced by _time_day_of_year(), _time_days_in_month(), localtime_r(), and mktime().

◆ _time_normalize()

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()

_time_zone_t * _time_zone ( void  )

Definition at line 13 of file time_utils.c.

References timeZone.

Referenced by localtime_r().

◆ _time_zone_init()

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().