Re: Conversion errors for datetime fields

Поиск
Список
Период
Сортировка
От Larry Rosenman
Тема Re: Conversion errors for datetime fields
Дата
Msg-id 20001228111625.A15548@lerami.lerctr.org
обсуждение исходный текст
Ответ на Re: Conversion errors for datetime fields  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Conversion errors for datetime fields  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
* Tom Lane <tgl@sss.pgh.pa.us> [001228 10:28]:
> pgsql-bugs@postgresql.org writes:
> regression=# select now()::date+'0:00:59.999'::time;
>          ?column?
> ---------------------------
>  2000-12-28 00:00:60.00-05
> (1 row)
>
> The cause is clear enough: the 59.999 seconds are being rounded off
> to two digits for display.  But it's unfortunate that this causes a
> displayed output that will not be accepted as valid input.  Perhaps
> it would be a good idea to round off the seconds to display precision
> *before* the value is broken down to hh/mm/ss.
Aren't we *REQUIRED* by SQL99 to accept up to :61 to account for
leap seconds?

--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Conversion errors for datetime fields
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Conversion errors for datetime fields