Link Search Menu Expand Document

CURRENT_TIMESTAMPTZ

Returns the current timestamp as a TIMESTAMPTZ value.

Syntax

The function can be called with or without parentheses:

CURRENT_TIMESTAMPTZ
CURRENT_TIMESTAMPTZ()

Return Type

TIMESTAMPTZ

Remarks

The function takes the current Unix timestamp (in the UTC time zone), 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_TIMESTAMPTZ;  --> 2023-03-03 15:42:31.123456+01

SET time_zone = 'America/New_York';
SELECT CURRENT_TIMESTAMPTZ;  --> 2023-03-03 09:42:31.123456-05