NOW
Returns the current date and time with the time zone.
PostgreSQL 17.5
NOW()Return value
A timestamp with time zone (timestamptz) at the start of the transaction
Examples
Current date and time
PostgreSQL 17.5
SELECT NOW();The moment one day ago
PostgreSQL 17.5
SELECT NOW() - INTERVAL '1 day' AS yesterday;Details
The value of NOW() does not change within one transaction. The time zone comes from the session's TimeZone setting, which is UTC in the sandbox. The current date and time without a time zone are returned by LOCALTIMESTAMP.