Re: Bug in date/time input format

Lists: pgsql-bugs
From: Christopher Swan <chris(at)exile(dot)co(dot)nz>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Bug in date/time input format
Date: 2002-10-07 22:58:16
Message-ID: B9C878D8.7B77%chris@exile.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hi, I have detected a bug in the date / time input format used in an insert
statement in Postgres 7.2.1-5 (Redhat 7.3).

If I use the following format:

'Tue, 08 Oct 2002 10:01:02 +1300'

then I get the following error:

ERROR: Bad timestamp external representation 'Tue, 08 Oct 2002 10:01:02
+1300'

However if I use this format:

'Tue, 08 Oct 2002 10:01:02 NZDT'

it inserts ok.

'+1300' is valid for New Zealand during the daylight saving period.

Regards, Christopher Swan


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Christopher Swan <chris(at)exile(dot)co(dot)nz>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug in date/time input format
Date: 2002-10-08 21:42:04
Message-ID: Pine.LNX.4.44.0210082109580.928-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Christopher Swan writes:

> Hi, I have detected a bug in the date / time input format used in an insert
> statement in Postgres 7.2.1-5 (Redhat 7.3).
>
> If I use the following format:
>
> 'Tue, 08 Oct 2002 10:01:02 +1300'
>
> then I get the following error:

Is there a spot in the documentation that leads you to believe that this
format is supported? If not, then it's not a bug.

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Christopher Swan <chris(at)exile(dot)co(dot)nz>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug in date/time input format
Date: 2002-10-09 05:06:37
Message-ID: 17458.1034139997@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Christopher Swan writes:
>> If I use the following format:
>> 'Tue, 08 Oct 2002 10:01:02 +1300'
>> then I get the following error:

> Is there a spot in the documentation that leads you to believe that this
> format is supported? If not, then it's not a bug.

It is a bug, because +1300 *should* be accepted. The fact that you
can't get more than 180 degrees of longitude away from Greenwich has
not deterred the politicians who set timezone rules :-(. I don't know
of any -1300 time zone, but +1300 is used in the real world.

regards, tom lane