From: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
---|---|
To: | pszegheo(at)itnnetworks(dot)com |
Cc: | PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14337: "HDT" time zone is not recognized by PostreSQL 9.5 |
Date: | 2016-09-23 21:05:31 |
Message-ID: | CAEepm=34=cNT1ng53S4zy0f9zZGensKys6P81RKomdiNWNyaSg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Sat, Sep 24, 2016 at 8:48 AM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> On Sat, Sep 24, 2016 at 7:52 AM, <pszegheo(at)itnnetworks(dot)com> wrote:
>> The following bug has been logged on the website:
>>
>> Bug reference: 14337
>> Logged by: Pavol Szegheo
>> Email address: pszegheo(at)itnnetworks(dot)com
>> PostgreSQL version: 9.5.4
>> Operating system: Windows 10
>> Description:
>>
>> "HDT" time zone is not recognized by PostreSQL 9.5
>>
>> Neither are the more modern HADT and HAST time zones recognized by PostreSQL
>> 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';
>>
>> e.g.:
>> SELECT TIMESTAMP '2013-08-13 00:00:00' AT TIME ZONE 'HDT';
>> /*
>> Example output:
>> ERROR: time zone "HDT" not recognized
>> ********** Error **********
>>
>> ERROR: time zone "HDT" not recognized
>> SQL state: 22023
>> */
>
> Hawaii doesn't do daylight savings.
>
> BTW Most people would advise you to use 'Pacific/Honolulu' instead.
Hmm. src/timezone/data/northamerica does reference HDT though:
# From Paul Eggert (2015-04-17):
# HST and HDT are standardized abbreviations for Hawaii-Aleutian
# standard and daylight times. See section 9.47 (p 234) of the
# U.S. Government Printing Office Style Manual (2008)
# http://www.gpo.gov/fdsys/pkg/GPO-STYLEMANUAL-2008/pdf/GPO-STYLEMANUAL-2008.pdf
... and ...
# From Arthur David Olson (2011-01-19):
# The following is from "Laws of the Territory of Hawaii Passed by the
# Seventeenth Legislature: Regular Session 1933," available (as of
# 2011-01-19) at American University's Pence Law Library. Page 85: "Act
# 90...At 2 o'clock ante meridian of the last Sunday in April of each
# year, the standard time of this Territory shall be advanced one
# hour...This Act shall take effect upon its approval. Approved this 26th
# day of April, A. D. 1933. LAWRENCE M JUDD, Governor of the Territory of
# Hawaii." Page 172: "Act 163...Act 90 of the Session Laws of 1933 is
# hereby repealed...This Act shall take effect upon its approval, upon
# which date the standard time of this Territory shall be restored to
# that existing immediately prior to the taking effect of said Act 90.
# Approved this 21st day of May, A. D. 1933. LAWRENCE M. JUDD, Governor
# of the Territory of Hawaii."
#
# Note that 1933-05-21 was a Sunday.
# We're left to guess the time of day when Act 163 was approved; guess noon.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00
-10:30 - HST 1933 Apr 30 2:00
-10:30 1:00 HDT 1933 May 21 12:00
-10:30 - HST 1942 Feb 9 2:00
-10:30 1:00 HDT 1945 Sep 30 2:00
-10:30 - HST 1947 Jun 8 2:00
-10:00 - HST
Link Pacific/Honolulu Pacific/Johnston
But I guess it doesn't work when you specify HDT explicitly because
it's missing from this bit:
# From Arthur David Olson, 2005-12-19
# We generate the files specified below to guard against old files with
# obsolete information being left in the time zone binary directory.
# We limit the list to names that have appeared in previous versions of
# this time zone package.
# We do these as separate Zones rather than as Links to avoid problems if
# a particular place changes whether it observes DST.
# We put these specifications here in the northamerica file both to
# increase the chances that they'll actually get compiled and to
# avoid the need to duplicate the US rules in another file.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone EST -5:00 - EST
Zone MST -7:00 - MST
Zone HST -10:00 - HST
Zone EST5EDT -5:00 US E%sT
Zone CST6CDT -6:00 US C%sT
Zone MST7MDT -7:00 US M%sT
Zone PST8PDT -8:00 US P%sT
Perhaps you'd need to ask about this over here? https://www.iana.org/time-zones
--
Thomas Munro
http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-09-23 21:27:42 | Re: BUG #14337: "HDT" time zone is not recognized by PostreSQL 9.5 |
Previous Message | Tom Lane | 2016-09-23 20:56:59 | Re: BUG #14337: "HDT" time zone is not recognized by PostreSQL 9.5 |