util.Datetime.toLocalTime() converts a DATETIME value in UTC to the DATETIME value in the local time zone.
Syntax
util.Datetime.toLocalTime(utc)
Parameters
utc |
a DATETIME value that must be converted from UTC to the local time zone |
Usage and examples
util.Datetime.toLocalTime() takes a DATETIME value in UTC and converts it to the DATETIME value in the local time zone:
example code |
MAIN DEFINE local DATETIME YEAR TO SECOND DISPLAY "UTC: 2017-02-23 12:34:56" LET local = util.Datetime.toLocalTime(DATETIME(2017-02-23 12:34:56) YEAR TO SECOND) DISPLAY "Local: ", local CALL fgl_getkey() END MAIN |
obtained results |
|