You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

As a workaround, the time zone can be set via a Linux command line

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




  • No labels