Re: Conversion errors for datetime fields - Mailing list pgsql-bugs

From Larry Rosenman
Subject Re: Conversion errors for datetime fields
Date
Msg-id 20001228111625.A15548@lerami.lerctr.org
Whole thread Raw
In response to Re: Conversion errors for datetime fields  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Conversion errors for datetime fields  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Conversion errors for datetime fields
Next
From: Tom Lane
Date:
Subject: Re: Conversion errors for datetime fields