Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

TIMEZONE function

Focus mode
TIMEZONE function - Amazon Redshift

TIMEZONE returns a timestamp for the specified time zone and timestamp value.

For information and examples about how to set time zone, see timezone.

For information and examples about how to convert time zone, see CONVERT_TIMEZONE.

Syntax

TIMEZONE('timezone', { timestamp | timestamptz })

Arguments

timezone

The time zone for the return value. The time zone can be specified as a time zone name (such as 'Africa/Kampala' or 'Singapore') or as a time zone abbreviation (such as 'UTC' or 'PDT'). To view a list of supported time zone names, run the following command.

select pg_timezone_names();

To view a list of supported time zone abbreviations, run the following command.

select pg_timezone_abbrevs();

For more information and examples, see Time zone usage notes.

timestamp | timestamptz

An expression that results in a TIMESTAMP or TIMESTAMPTZ type, or a value that can implicitly be coerced to a timestamp or a timestamp with time zone.

Return type

TIMESTAMPTZ when used with a TIMESTAMP expression.

TIMESTAMP when used with a TIMESTAMPTZ expression.

Examples

The following returns a timestamp for the UTC time zone using the timestamp 2008-06-17 09:44:54 from the PST timezone.

SELECT TIMEZONE('PST', '2008-06-17 09:44:54'); timezone ----------------------- 2008-06-17 17:44:54+00

The following returns a timestamp for the PST time zone using the timestamp with UTC time zone 2008-06-17 09:44:54+00.

SELECT TIMEZONE('PST', timestamptz('2008-06-17 09:44:54+00')); timezone ----------------------- 2008-06-17 01:44:54

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.