Build a valid Unix epoch date/time structure.
Files
clk_cmd.h/clk.c
Prototype
Arguments
p_date_time
Pointer to variable that will receive the date/time structure.
...
Time zone offset (in seconds, ± from UTC) [-43200 to 43200].
Returned Values
DEF_OK
, if date/time structure successfully returned.
DEF_FAIL
, otherwise.
Required Configuration
Available only if CLK_CFG_UNIX_EN
is DEF_ENABLED
in clk_cfg.h
(see Module Configuration).
Notes / Warnings
Date/time structure (p_date_time
) must be representable in Unix timestamp. Thus date to convert must be greater than or equal to CLK_UNIX_EPOCH_YR_START
and less than CLK_UNIX_EPOCH_YR_END
.
Day of week (p_date_time->DayOfWk
) and Day of year (p_date_time->DayOfYr
) are internally calculated and set in the date/time structure.