SysDateTimeToLocal: Convert UTC to Local Time

Help Contents

Introduction

Converts a DATE_AND_TIME value from UTC to local time.

Syntax

Informal Syntax:

SysDateTimeToLocal( In )

Formal Syntax:

SysDateTimeToLocal( In:=expression )

Parameters

ParameterTypeDescription
InANY_DATEThe UTC date and time value to convert to a local time.

Return Value

The return value is the In parameter converted to local time.

Remarks

Requires Fernhill SCADA Version 3.71 and later.

Examples

ExampleReturn Value
SysDateTimeToLocal(DT#2018-01-10-12:00:00.000)DT#2018-07-10-12:00:00.000
SysDateTimeToLocal(DT#2018-07-10-12:00:00.000)DT#2018-07-10-13:00:00.000

Note: The return values are based on the time zone of London, England.

Standards Compliance

The function SysDateTimeToLocal is an extension to the IEC 61131-3 standard.

Further Information

SysDateTimeToUTC()

To learn about a function to convert a local Date and Time value to UTC.

SysGetDateAndTime()

To learn about a function to return the current date and time.

System Functions

To learn about other system functions.

Elementary Data Types

To learn about the different types supported by Fernhill SCADA.

Common Elements

To learn about other IEC 61131-3 Common Elements.

Glossary

For the meaning of terms used in Fernhill SCADA.