SET TIME ZONE

Description

The SET TIME ZONE command sets the time zone of the current session.

Syntax

SET TIME ZONE LOCAL
SET TIME ZONE 'timezone_value'
SET TIME ZONE INTERVAL interval_literal

Parameters

Examples

-- Set time zone to the system default.
SET TIME ZONE LOCAL;

-- Set time zone to the region-based zone ID.
SET TIME ZONE 'America/Los_Angeles';

-- Set time zone to the Zone offset.
SET TIME ZONE '+08:00';

-- Set time zone with intervals.
SET TIME ZONE INTERVAL 1 HOUR 30 MINUTES;
SET TIME ZONE INTERVAL '08:30:00' HOUR TO SECOND;