Time shift summer/winter time

GETDSTOFFSET

PROGRAM GETDSTOFFSET_DEMO
  VAR
     TIME_OUT: TIME;
 END_VAR
 TIME_OUT:=GETDSTOFFSET(T:=GETLOCALTIME());
END_PROGRAM

The block returns the time difference between standard zone time and zone daylight saving time. The output is 0 h at winter time, and 1 h at summer time for central Europe. The change takes place at midnight.

InputTypeDescription
T DT Input date and time
OutputTypeDescription
TIMEOutput value

  • © Energocentrum Plus, s.r.o. 2017 - 2024