As a workaround, the time zone can be set via a Linux command line
The package "systemd" must be installed on the system.
== >> Workaround is not working on PFC100/PFC200 runtime
Allow the command: SysProcess
The list of available time zones can be read out via the command line
timedatectl list-timezones
Declaration
VAR sCmdCet : STRING := 'timedatectl set-timezone Europe/Berlin'; sCmdGmt : STRING := 'timedatectl set-timezone Etc/GMT'; xSetGmt : BOOL; xSetCet : BOOL; rtsResult : SysTypes.RTS_IEC_RESULT; diReturn : DINT; END_VAR
Implementation
IF xSetGmt THEN xSetGmt := FALSE; diReturn := Sysprocess.SysProcessExecuteCommand(pszComand := sCmdGmt, ADR(rtsResult)); END_IF IF xSetCet THEN xSetCet := FALSE; diReturn := Sysprocess.SysProcessExecuteCommand(pszComand := sCmdCet, ADR(rtsResult)); END_IF