I have data stored in a timestamp with timezone column (timestamptz) in UTC.
I want to query in a different timezone (Australia/Sydney +10) but retain the timezone
SELECT
'2022-05-04 14:00:01.546+00'::timestamp AT time zone 'UTC',
timezone('Australia/Sydney', '2022-05-04 14:00:01.546+00'::timestamp AT time zone 'UTC')
;
This returns:
"2022-05-04 14:00:01.546+00" timestamp with time zone
"2022-05-05 00:00:01.546" timestamp without time zone
What I want is:
"2022-05-05 00:00:01.546+10" timestamp with time zone
i.e. convert from +00 to +10 and retain the time zone. I keep finding examples that convert to local time without the timezone info. I'm trying to map to a pyarrow.Table and want to infer the correct type timestamp[ns, tz=Australia/Sydney] rather than timestamp[ns, tz=UTC]
Edit: To make it clearer I've tried the following:
select
ts,
timezone('Australia/Sydney', ts),
ts at time zone 'Australia/Sydney'
from timeseries
limit 1

the_column at time zone 'Australia/Sydney'timezone('Australia/Sydney', the_column)- atimestamp without timezoneof value "2022-05-05 00:00:01.546". At least when I run it in pgAdmintimestamp WITH time zone