get timezone abbreviation for arbitrary time in arbitrary locale

260 views Asked by At

I have a UTC time and a locale name in Postgres. I want to get the local timezone abbreviation at that specific time (the time matters since, for e.g. the America/New_York timezone, the abbreviation might be EST or EDT depending on whether the time falls within DST).

Ideally I'd use pg_timezone_names (https://www.postgresql.org/docs/9.6/static/view-pg-timezone-names.html) to map the timezone name to an abbreviation, but pg_timezone_names is based on CURRENT_TIMESTAMP, not on the time I'm concerned with.

0

There are 0 answers