Convert to UTC time

CONVERTTOUTCTIME

PROGRAM CONVERTTOUTCTIME_DEMO
  VAR
     TIME_OUT: DT;
   END_VAR
 TIME_OUT:=CONVERTTOUTCTIME(T:=GETLOCALTIME());
END_PROGRAM

The block converts local time and date (according to time zone) to UTC.

InputTypeDescription
T DT Local date and time
OutputTypeDescription
DT UTC date and time

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