Table of Contents

Convert to local time

Function name

CONVERTTOLOCALTIME

ST call

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

Description

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

Inputs

InputTypeDescription
T DT Input UTC date and time

Outputs

OutputTypeDescription
DT Output, local date and time

Application example