How to get the list of timezones supported by PostgreSQL?
You may try selecting from the view pg_timezone_names
, as the documentation says:
The view pg_timezone_names provides a list of time zone names that are recognized by SET TIMEZONE, along with their associated abbreviations, UTC offsets, and daylight-savings status.
Try the following query:
SELECT
name,
abbrev,
utc_offset,
is_dst
FROM pg_timezone_names;
The answer from Tim was excellent. For whatever reason my Postgres DB also contained a bunch of fluff with the prefix "posix/" and I also needed these in alphabetical order to use on a website, so I did this:
SELECT
name,
abbrev,
utc_offset,
is_dst
FROM pg_timezone_names
WHERE name !~ 'posix'
ORDER BY name asc;