Обсуждение: "HDT" time zone not recognized by PostreSQL 9.5

Поиск
Список
Период
Сортировка

"HDT" time zone not recognized by PostreSQL 9.5

От
Pavol Szegheo
Дата:
SELECT TIMESTAMP '2013-08-13 00:00:00' AT TIME ZONE 'HDT' AT TIME ZONE 'UTC=
';
/* ERROR:  time zone "HDT" not recognized
********** Error **********

ERROR: time zone "HDT" not recognized
SQL state: 22023
*/

Re: "HDT" time zone not recognized by PostreSQL 9.5

От
Pavol Szegheo
Дата:
Neither are the more modern HADT and HAST time zones recognized by PostreSQ=
L 9.5

So, the only Hawaiian timezone recognized by PostreSQL 9.5 is HST, thus the=
 following would run fine:
SELECT TIMESTAMP '2013-08-13 00:00:00' AT TIME ZONE 'HST';

While all these would fail:

SELECT TIMESTAMP '2013-08-13 00:00:00' AT TIME ZONE 'HDT';

SELECT TIMESTAMP '2013-08-13 00:00:00' AT TIME ZONE 'HADT';

SELECT TIMESTAMP '2013-08-13 00:00:00' AT TIME ZONE 'HAST';


From: Pavol Szegheo
Sent: Friday, September 23, 2016 3:36 PM
To: pgsql-bugs@postgresql.org
Subject: "HDT" time zone not recognized by PostreSQL 9.5

SELECT TIMESTAMP '2013-08-13 00:00:00' AT TIME ZONE 'HDT' AT TIME ZONE 'UTC=
';
/* ERROR:  time zone "HDT" not recognized
********** Error **********

ERROR: time zone "HDT" not recognized
SQL state: 22023
*/

Re: "HDT" time zone not recognized by PostreSQL 9.5

От
Greg Stark
Дата:
On Fri, Sep 23, 2016 at 8:47 PM, Pavol Szegheo <PSzegheo@itnnetworks.com> wrote:
> Neither are the more modern HADT and HAST time zones recognized by PostreSQL
> 9.5

The IANA says:

     The abbreviations for Hawaii-Aleutian standard and daylight times
     have been changed from HAST/HADT to HST/HDT, as per US Government
     Printing Office style.  This affects only America/Adak since 1983,
     as America/Honolulu was already using the new style.

So it looks like HST and HDT should both be accepted but HAST and HADT
should not. "HST" is in the Postgres "Default" abbreviations list but
HDT is missing. There was a push to drop "invented" abbreviations at
some point but it doesn't look at first glance like that ought to have
hit HDT. This may indeed be an unintentional omission, I'm not sure.

The timezonesets are configuration files for Postgres so you should
feel free to edit <pgsqlroot>/share/timezonesets/Default to add HDT or
create your own based on it and set timezone_abbreviations to your new
file. It is listed in America.txt which contains a list of obsolete or
ambiguous abbreviations



--
greg