Re: Conversion errors for datetime fields

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Conversion errors for datetime fields
Date: 2000-12-28 17:16:25
Message-ID: 20001228111625.A15548@lerami.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

* Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> [001228 10:28]:
> pgsql-bugs(at)postgresql(dot)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(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2000-12-28 17:33:07 Re: Conversion errors for datetime fields
Previous Message Tom Lane 2000-12-28 16:28:14 Re: Conversion errors for datetime fields