Extended instructions
8.1 Date, time-of-day, and clock functions
● The local time is calculated by using the time zone and daylight saving time offsets that
you set in the device configuration general tab "Time of day" parameters.
● Time zone configuration is an offset to UTC or GMT time.
● Daylight saving time configuration specifies the month, week, day, and hour when
daylight saving time begins.
● Standard time configuration also specifies the month, week, day, and hour when standard
time begins.
● The time zone offset is always applied to the system time value. The daylight saving time
offset is only applied when daylight saving time is in effect.
Note
Daylight saving and standard start time configuration
The "Time of day" properties for "Start for daylight saving time" of the CPU device
configuration must be your local time.
Condition codes: ENO = 1 means no error occurred. ENO = 0 means an execution error
occurred, and a condition code is provided at the RET_VAL output.
RET_VAL (W#16#....) Description
0000
0001
8080
8081
8082
8083
8084
8085
8086
8087
8089
80B0
80B1
288
The current local time is in standard time.
Daylight saving time has been configured, and the current local time is in daylight saving time.
Local time not available or LOCTIME value is invalid.
Illegal year value or time value assigned by the LOCTIME parameter is invalid
Illegal month value (byte 2 in DTL format)
Illegal day value (byte 3 in DTL format)
Illegal hour value (byte 5 in DTL format)
Illegal minute value (byte 6 in DTL format)
Illegal second value (byte 7 in DTL format)
Illegal nanosecond value (bytes 8 to 11 in DTL format)
Time value does not exist (hour already passed upon changeover to daylight saving time)
The real-time clock has failed
The "TimeTransformationRule" structure has not been defined.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG