I'm attempting to select a local time (as at Australia/Brisbane) from a timestamptz
field in a PostgreSQL database and noticed that when I use the +10
time zone abbreviation, PostgreSQL appears to subtract 10 hours from the UTC value instead of adding 10 hours.
If I use AEST
as the abbreviation, 10 hours are correctly added.
When I run the following query I would expect both values returned to be the same.
select
('2018-01-01T00:00:00Z'::timestamp with time zone) at time zone 'AEST',
('2018-01-01T00:00:00Z'::timestamp with time zone) at time zone '+10';
However, in my case I'm seeing the following results:
"2018-01-01 10:00:00" | "2017-12-31 14:00:00"
If I run the following query, all rows have a "utc_offset" interval of 10:00:00.
select * from pg_timezone_names
where abbrev in ('+10', 'AEST')
Could anyone offer an explanation as to what is going on here?
at time zone 'Australia/Brisbane'
?