Complete the code to convert the current timestamp to UTC time zone.
SELECT CURRENT_TIMESTAMP [1] 'UTC';
The AT TIME ZONE clause converts a timestamp to the specified time zone.
Complete the code to convert a timestamp with time zone to 'America/New_York' time zone.
SELECT timestamp_with_time_zone_column [1] 'America/New_York' FROM events;
AT TIME ZONE converts the timestamp to the specified time zone.
Fix the error in the code to convert '2024-06-01 12:00:00' timestamp to 'Europe/London' time zone.
SELECT TIMESTAMP '2024-06-01 12:00:00' [1] 'Europe/London';
AT TIME ZONE is the correct syntax to convert timestamp to a time zone in PostgreSQL.
Fill both blanks to convert a timestamp without time zone to UTC and then to 'Asia/Tokyo'.
SELECT (timestamp_column [1] 'UTC') [2] 'Asia/Tokyo' FROM meetings;
First, convert the timestamp without time zone to UTC using AT TIME ZONE 'UTC', then convert that result to 'Asia/Tokyo' time zone again using AT TIME ZONE 'Asia/Tokyo'.
Fill all three blanks to convert 'event_time' from 'UTC' to 'Europe/Paris' and extract the hour.
SELECT EXTRACT(HOUR FROM (event_time [1] [2]) [3] 'Europe/Paris') AS paris_hour FROM schedule;
First, convert event_time from 'UTC' using AT TIME ZONE 'UTC', then convert that timestamp to 'Europe/Paris' using AT TIME ZONE 'Europe/Paris', finally extract the hour.