Convert to local time

CONVERTTOLOCALTIME

PROGRAM CONVERTTOLOCALTIME_DEMO
    VAR
     TIME_OUT: DT;
   END_VAR
 TIME_OUT:=CONVERTTOLOCALTIME(T:=GETUTCTIME());
END_PROGRAM

The block converts UTC date and time to local date and time, using the time zone settings.

InputTypeDescription
T DT Input UTC date and time
OutputTypeDescription
DT Output, local date and time

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