Re: BUG #16169: Default time output for 24:00 is 00:00

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: folarte(at)peoplecall(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16169: Default time output for 24:00 is 00:00
Date: 2019-12-17 17:26:07
Message-ID: 20191217172607.GA10657@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2019-Dec-17, PG Bug reporting form wrote:

> The output correctly follows what the manual says (
> https://www.postgresql.org/docs/12/datatype-datetime.html ). Although the
> doc is correct, I have not been able to find any explicit mention of this
> behaviour. An explicit mention may be useful to avoid confusion, as one
> normally expects to be able to reconstruct inserted data from select results
> ( changing behaviour may hurt existing dependencies on current one ), and
> 2400 may be a common value when using time fields for things like "opening
> hours 16:00 - 24:00".

Do you have a concrete proposal? I think 8.5.1.2 could have a new para
saying "note that 24:00 is displayed as 00:00 because it really is the
start of the next day, and there's no way to distinguish that from 00:00
of the current day." Or maybe it should just state that using a time
column without an accompanying date column is a lost cause.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2019-12-17 17:49:35 Re: BUG #16169: Default time output for 24:00 is 00:00
Previous Message Tom Lane 2019-12-17 17:04:20 Re: weird long time query