CURRENT_TIMESTAMP
Returns the current timestamp as a TIMESTAMPTZ
value.
Syntax
The function can be called with or without parentheses:
CURRENT_TIMESTAMP
CURRENT_TIMESTAMP()
Return Type
TIMESTAMPTZ
Remarks
The function gets the current timestamp from the system, and returns it as a TIMESTAMPTZ
value.
Example
The following example assumes that the current Unix timestamp is 2023-03-03 14:42:31.123456 UTC
.
SET time_zone = 'Europe/Berlin';
SELECT CURRENT_TIMESTAMP; --> 2023-03-03 15:42:31.123456+01
SET time_zone = 'America/New_York';
SELECT CURRENT_TIMESTAMP; --> 2023-03-03 09:42:31.123456-05