Skip to main content

SET TIME ZONE

Use the SET TIME ZONE command to specify the time zone that should be used to interpret date and time values.

Syntax

SET TIME ZONE { time_zone | LOCAL | DEFAULT };

Parameters

ParameterDescription
time_zoneSpecifies the time zone using a valid time zone name, such as "America/New_York" or "Asia/Shanghai". You can find a list of all possible time_zone values here
LOCALSets the time zone to the system's local time zone.
DEFAULTSets the time zone to the server's default time zone.

Examples

SET TIME ZONE "America/New_York";
SET TIME ZONE LOCAL;
SET TIME ZONE DEFAULT;

Help us make this doc better!