util.Datetime.toLocalTime

Converts a UTC datetime to the local time.

Syntax

util.Datetime.toLocalTime(
  t DATETIME q1 TO q2
 )
  RETURNS DATETIME q1 TO q2
  1. t is the datetime value in UTC.

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