util.Datetime.toLocalTime

Converts a UTC datetime to the local time.

Syntax

util.Datetime.toLocalTime(
  utc DATETIME q1 TO q2
 )
  RETURNING local DATETIME q1 TO q2
  1. utc is the datetime value in UTC.
  2. local is the local tinezone datetime value.

Usage

The util.Datetime.toLocalTime() method converts a DATETIME value from "Coordinated Universal Time" (UTC), also known as "Greenwich Mean Time" (GMT), to the local timezone datetime.

Example

IMPORT util
MAIN
    DEFINE loc DATETIME YEAR TO SECOND
    LET loc = util.Datetime.toLocalTime( DATETIME(2015-08-22 15:34:56) YEAR TO SECOND )
    DISPLAY "LOC: ", loc
END MAIN