PostgreSQL 18 reference · Date and Time Functions

PostgreSQL AT TIME ZONE Operator

Convert between time zones: timestamptz AT TIME ZONE 'Asia/Tokyo' shows local time there.

PostgreSQL 18

Create a free account to save this page, take notes and track your progress. Sign in

Syntax

timestamptz AT TIME ZONE zone  |  timestamp AT TIME ZONE zone  |  timestamptz AT LOCAL

Parameters

ParameterDescription
zone A time zone name such as 'Europe/London', or an offset.

Return value

timestamp (from timestamptz) or timestamptz (from timestamp).

Examples

Show local times
SELECT TIMESTAMPTZ '2026-03-09 12:00+00' AT TIME ZONE 'Asia/Tokyo' AS tokyo,
       TIMESTAMPTZ '2026-03-09 12:00+00' AT TIME ZONE 'America/New_York' AS new_york;

Output

        tokyo        |      new_york
---------------------+---------------------
 2026-03-09 21:00:00 | 2026-03-09 08:00:00
(1 row)

Run this on your computer — see “Get Started” for setup.

Interpret a local time
SELECT TIMESTAMP '2026-03-09 09:00' AT TIME ZONE 'Europe/Paris' AS paris_9am_in_utc;

Output

    paris_9am_in_utc
------------------------
 2026-03-09 08:00:00+00
(1 row)

Run this on your computer — see “Get Started” for setup.

Version history

VersionChange
PostgreSQL 17AT LOCAL converts to the session's time zone.

Was this page helpful?