Appearance
CURRENT_UTC_TIMESTAMP()
Return the UTC date and time when the current transaction starts. This value does not change during the course of a transaction and does not reflect the individual start times of statements within a transaction.
CURRENT_UTC_TIMESTAMP()
The parentheses are required. The return type is TIMESTAMP
.
For example:
premdb=# select current_timestamp, current_utc_timestamp() from sys.const;
now | current_utc_timestamp
------------------------------+---------------------------
2019-09-12 17:23:54.85683-07 | 2019-09-13 00:23:54.85683
(1 row)
premdb=# select current_utc_timestamp()-current_timestamp from sys.const;
?column?
----------
07:00:00
(1 row)
You can extract supported date parts from the CURRENT_UTC_TIMESTAMP
result:
premdb=# select extract(week from current_utc_timestamp()) from sys.const;
date_part
-----------
37
(1 row)
Parent topic:Datetime Functions