Local time zone offset in PostgreSQL Local time zone offset in PostgreSQL postgresql postgresql

Local time zone offset in PostgreSQL


SELECT  current_setting('TIMEZONE')

This can be used in a query, however, this does not give a numerical difference.

Your solution is fine.


To get # of seconds difference as an integer, I have used simply:

select extract( timezone from now() );