/
Clk_SetTZ
Clk_SetTZ
Set Clock time zone offset.
Files
clk.h/clk.c
Prototype
CPU_BOOLEAN Clk_SetTZ (CLK_TZ_SEC tz_sec);
Arguments
tz_sec
Time zone offset (in seconds, ± from UTC).
Returned Values
DEF_OK
, if time zone is valid and set.
DEF_FAIL
, otherwise.
Required Configuration
None.
Notes / Warnings
Time zone is based on Coordinated Universal Time (UTC) and has valid values:
- Between ±12 hours (±43200 seconds)
- Multiples of 15 minutes
Example Usage
Listing - Clk_SetTZ() Example Usage
CLK_TZ_SEC tz_sec; CPU_BOOLEAN valid; tz_sec = -5 * 3600; valid = Clk_SetTZ(tz_sec); if (valid == DEF_OK) { printf("Clock Set TZ successful\n\r"); } else { printf("Clock Set TZ error\n\r"); }
, multiple selections available,
Related content
Clk_GetTZ
Clk_GetTZ
More like this
Clk_SetDateTime
Clk_SetDateTime
More like this
Clk_SetTS
Clk_SetTS
More like this
Clk_GetDateTime
Clk_GetDateTime
More like this
Clk_TS_ToDateTime
Clk_TS_ToDateTime
More like this
Clk_SetTS_NTP
Clk_SetTS_NTP
More like this