PopSQL
To convert a Redshift timestamp from one time zone to another, use the convert_timezone() function:
convert_timezone()
-- convert_timezone(source, target, timestamp); SELECT convert_timezone('PST', 'EST', '2018-12-21 13:42:11');
The source time zone is optional. If omitted, Redshift will assume it is in UTC.
SELECT convert_timezone('EST', sysdate);
To check the supported time zone names and abbreviations, you can execute the following commands:
SELECT pg_timezone_names(); SELECT pg_timezone_abbrevs();
Spread the word