util.Datetime.toLocalTime

Converts a UTC datetime to the local time.

Syntax

util.Datetime.toLocalTime(
  utc_datetime DATETIME q1 TO q2
 )
  RETURNING local_datetime DATETIME q1 TO q2

Usage

The util.Datetime.toLocalTime() method converts the DATETIME value passed as parameter to the local time.

IMPORT util
MAIN
    DEFINE utc, loc DATETIME YEAR TO SECOND
    LET loc = CURRENT YEAR TO SECOND
    DISPLAY loc
    LET utc = util.Datetime.toUTC( loc )
    DISPLAY loc
END MAIN