Function Reference

CURRENT_TIME

MySQL equivalent:

Returns the current time with the time zone.

PostgreSQL 17.5
CURRENT_TIME[(precision)]

Parameters

precisionintegeroptional
Number of fractional digits of the seconds, 0 to 6; all 6 by default

Return value

A time with time zone at the start of the transaction, for example 14:39:53.662522+00

Examples

Current time

PostgreSQL 17.5
SELECT CURRENT_TIME;

Without fractional seconds

PostgreSQL 17.5
SELECT CURRENT_TIME(0);

Details

The time zone comes from the TimeZone setting, which is UTC in the sandbox. The time without a time zone is returned by LOCALTIME. A precision above 6 is reduced to 6.

See also

Where to learn