I am doing some timestamp conversion from UTC to Eastern Standard Time but found something puzzling on the "Spring forward" hour which happened on 3/12/2023 this year. As you can see, the conversion to Easter Prevailing Time using 'US/Eastern' worked all fine. However, in all three versions that I tried to convert to Eastern Standard Time failed for row 8. Row 8 is supposed to be '2023-03-12 02:00:00.000' at Eastern Standard Time (UTC-5). Instead, it showed as '2023-03-12 03:00:00.000'. But for hour before and after that row, the conversions were done correctly. Not sure if I did something wrong or understood something wrong or is this a bug? Thank you for your help on this.
select start_time_utc as utc
, CAST(start_time_utc AT TIME ZONE 'UTC' AT TIME ZONE 'US/Eastern' AS timestamp) AS east_prevailing
, CAST(start_time_utc AT TIME ZONE 'UTC' AT TIME ZONE 'EST' AS timestamp) AS eastern_stabdard_v1
, CAST(start_time_utc AT TIME ZONE 'UTC' AT TIME ZONE 'Etc/GMT+5' AS timestamp) AS eastern_stabdard_v2
, CAST(start_time_utc AT TIME ZONE 'UTC' AT TIME ZONE 'America/Cancun' AS timestamp) AS eastern_stabdard_v3
from public.crr_obligation_hourly
where unit_id =1 and extract(month from start_time_utc)=3 and extract(day from start_time_utc)=12
order by 1
Update: This issue was actually caused by DBeaver. I will post my answer below.