util.Datetime.toLocalTime

Converts a UTC date/time 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 UTC (Coordinated Universal Time), to the local timezone date/time.

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