Postgresql: change time zone timestamp without changing hours?

I have a timestamp field in my table that stores data in UTC-10. However, the correct time zone is UTC + 10

I would like to change part of the time zone to UTC + 10 without changing the clock. Just want the system to treat the same timestamp as UTC + 10 instead of UTC-10

If i like it

select email_timestamp as time zone 'UTC+10' from emails

then he also shifts the clock.

Can someone please tell me how to change the time zone without changing the clock?

+4
source share
1 answer

Reset the time zone without changing the time, then add the time zone without converting the time:

(myfield::timestamp || 'UTC+10')::timestamptz

Select it again for your time zone to see what you like:

SELECT myfield AT TIME ZONE 'UTC+10'
+3

All Articles