PatchworkOS
966e257
A non-POSIX operating system.
Theme:
Default
Round
Robot
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.
8
9
typedef
struct
10
{
11
int64_t
secondsOffset
;
12
}
_time_zone_t
;
13
14
void
_time_zone_init
(
void
);
15
16
_time_zone_t
*
_time_zone
(
void
);
17
18
bool
_time_is_leap_year
(
int32_t
year);
19
20
int32_t
_time_days_in_month
(
int32_t
month,
int32_t
year);
21
22
void
_time_normalize
(
struct
tm
* timePtr);
23
24
void
_time_day_of_week
(
struct
tm
* timePtr);
25
26
void
_time_day_of_year
(
struct
tm
* timePtr);
stdbool.h
stdint.h
int32_t
__INT32_TYPE__ int32_t
Definition
stdint.h:14
int64_t
__INT64_TYPE__ int64_t
Definition
stdint.h:16
_time_zone_t
Definition
time_utils.h:10
_time_zone_t::secondsOffset
int64_t secondsOffset
Definition
time_utils.h:11
tm
Definition
time.h:21
time.h
_time_is_leap_year
bool _time_is_leap_year(int32_t year)
Definition
time_utils.c:22
_time_zone
_time_zone_t * _time_zone(void)
Definition
time_utils.c:13
_time_normalize
void _time_normalize(struct tm *timePtr)
Definition
time_utils.c:36
_time_day_of_year
void _time_day_of_year(struct tm *timePtr)
Definition
time_utils.c:122
_time_day_of_week
void _time_day_of_week(struct tm *timePtr)
Definition
time_utils.c:103
_time_days_in_month
int32_t _time_days_in_month(int32_t month, int32_t year)
Definition
time_utils.c:27
_time_zone_init
void _time_zone_init(void)
Definition
time_utils.c:5
src
libstd
common
time_utils.h
Generated on Mon Dec 15 2025 21:55:53 for PatchworkOS by
1.9.8