PatchworkOS
Loading...
Searching...
No Matches
time_utils.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdbool.h>
4#include <stdint.h>
5#include <time.h>
6
7// TODO: Time zone handling is NOT compliant with the c standard (for now). Daylight savings time.
8typedef struct
9{
12
13void _time_zone_init(void);
14
16
18
20
21void _time_normalize(struct tm* timePtr);
22
23void _time_day_of_week(struct tm* timePtr);
24
25void _time_day_of_year(struct tm* timePtr);
__INT32_TYPE__ int32_t
Definition stdint.h:14
__INT64_TYPE__ int64_t
Definition stdint.h:16
int64_t secondsOffset
Definition time_utils.h:10
Definition time.h:21
bool _time_is_leap_year(int32_t year)
Definition time_utils.c:24
_time_zone_t * _time_zone(void)
Definition time_utils.c:13
void _time_normalize(struct tm *timePtr)
Definition time_utils.c:38
void _time_day_of_year(struct tm *timePtr)
Definition time_utils.c:124
void _time_day_of_week(struct tm *timePtr)
Definition time_utils.c:105
int32_t _time_days_in_month(int32_t month, int32_t year)
Definition time_utils.c:29
void _time_zone_init(void)
Definition time_utils.c:5