Extended instructions
9.1 Date, time-of-day, and clock functions
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
343
SET_TIMEZONE (Set timezone)
Table 9- 11 SET_TIMEZONE instruction
REQ:=_bool_in,
Timezone:=_struct_in,
DONE=>_bool_out_,
BUSY=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_);
Sets the local time zone and daylight sav-
ing parameters that are used to transform
the CPU system time to local time.
1
In the SCL example, "SET_TIMEZONE_DB" is the name of the instance DB.
Table 9- 12 Data types for the parameters
Timezone IN TimeTransformationRule Rules for the transformation from system time to
ERROR OUT Bool Error detected
Function result / error message
To manually configure the time zone parameters for the CPU, use the "Time of day"
properties of the "General" tab of the device configuration.
Use the SET_TIMEZONE instruction to set the local time configuration. The parameters of
the "TimeTransformationRule (Page 342)" structure assign the local time zone and timing for
automatic switching between standard time and daylight saving time.
ENO = 1 means no error occurred. ENO = 0 means an execution error
occurred, and a condition code is provided at the STATUS output.
Start of job processing. Parameter BUSY = 1, DONE = 0
Intermediate call (REQ irrelevant): Instruction already active; BUSY has the value "1".
Error at x-th component: For example 8084 indicates that DaylightStartWeekif is not a value from 1to 5.