util.Datetime.getCurrentAsUTC() returns current date and time as UTC.
Syntax
util.Datetime.getCurrentAsUTC()
Usage and examples
util.Datetime.getCurrentAsUTC() returns current date and time as UTC.
The returned result is a DATETIME value with the precision YEAR TO FRACTION(5). This precision is different from the default precision of the CURRENT operator.
example code #1
|
MAIN DEFINE utc DATETIME YEAR TO FRACTION(5) LET utc = util.Datetime.getCurrentAsUTC() DISPLAY "CURRENT", CURRENT DISPLAY "Current UTC: ", utc CALL fgl_getkey() END MAIN |
obtained results #1 |
|
example code #2
|
MAIN DEFINE utc, local DATETIME YEAR TO FRACTION(5) LET utc = util.Datetime.getCurrentAsUTC() DISPLAY "Current UTC: ", utc LET local = util.Datetime.getCurrentAsLocal() DISPLAY "Current Local: ", local CALL fgl_getkey() END MAIN |
obtained results #2 |
|