Table of Contents

Convert to UTC time

Function name

CONVERTTOUTCTIME

ST call

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

Description

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

Inputs

InputTypeDescription
T DT Local date and time

Outputs

OutputTypeDescription
DT UTC date and time

Application example