Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Clk_TS_UnixToTS()

Anchor10554751055475Convert Unix timestamp to Clock timestamp.anchor10554761055476

Files

...

clk.h/clk.c

...

Prototype

...

classCode_Listing

...

...

Arguments

...

...

p_ts_sec Pointer to variable that will receive the Clock timestamp:

...

In seconds UTC+00, if no errors;
CLK_TS_SEC_NONE, otherwise. Anchor10554911055491

ts_unix_sec Unix timestamp value to convert (in seconds, UTC+00).

...

Returned Values

...

...

DEF_OK, if timestamp successfully converted.

...

DEF_FAIL, otherwise.

...

Required Configuration

Anchor10617351061735Available only if CLK_CFG_UNIX_EN is DEF_ENABLED in clk_cfg.h (see section 3-1-1). Anchor10554961055496

Notes / Warnings

Anchor10697061069706Returned timestamp does not include any time zone offset. Thus any local time zone offset should be applied before or after calling Clk_TS_UnixToTS().anchor10697071069707

Only years supported by Clock and Unix can be converted, thus the timestamp date must be greater than or equal to CLK_EPOCH_YR_START and less than CLK_UNIX_EPOCH_YR_END.anchor10555151055515

Example Usage

...

classCode_Listing

...

rowspan8

...