Bug #817: Valid timezone +1300 rejected

Started by PostgreSQL Bugs Listover 23 years ago2 messagesbugs
Jump to latest
#1PostgreSQL Bugs List
pgsql-bugs@postgresql.org

MI (mi@alma.ch) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Valid timezone +1300 rejected

Long Description
New Zealand Daylight Savings Time time zone is "+1300" (and others as well, I think). Silly, I agree, but that's how it is.
Postgresql 7.2.2 rejects it as "Bad timestamp external representation".

Sample Code
pms=> create table test (t timestamp);
CREATE
pms=> insert into test values ('Tue, 12 Nov 2002 08:22:37 +0100');
INSERT 71853 1
pms=> insert into test values ('Tue, 12 Nov 2002 08:22:37 +1300');
ERROR: Bad timestamp external representation 'Tue, 12 Nov 2002 08:22:37 +1300'

No file was uploaded with this report

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PostgreSQL Bugs List (#1)
Re: Bug #817: Valid timezone +1300 rejected

pgsql-bugs@postgresql.org writes:

Valid timezone +1300 rejected

Hm, this was reported before but didn't get fixed. I've now fixed it
for 7.3. It's a one-word change in DecodeTimezone() in
src/backend/utils/adt/datetime.c, if you want to patch your 7.2.

regards, tom lane