Обсуждение: Bug in date/time input format

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

Bug in date/time input format

От
Christopher Swan
Дата:
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

Re: Bug in date/time input format

От
Peter Eisentraut
Дата:
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@gmx.net

Re: Bug in date/time input format

От
Tom Lane
Дата:
Peter Eisentraut <peter_e@gmx.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