On Tue, Mar 15, 2022 at 3:46 AM Julien Rouhaud <rjuju...@gmail.com> wrote: > On Tue, Mar 15, 2022 at 12:54:58PM +0530, Prabhat Sahu wrote: > > > > Is there any specific purpose we are holding the hours as an increasing > > number beyond 24 hours also? > > Yes, you can't blindly assume that adding 24 hours will always be the same as > adding a day. You can just justify_days if you want to force that behavior.
The specific purpose by the way, at least according to the docs [1], is daylights savings time: > Internally interval values are stored as months, days, and microseconds. This > is done because > the number of days in a month varies, and a day can have 23 or 25 hours if a > daylight savings > time adjustment is involved. Though I suppose leap seconds may also follow similar logic. [1] https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-INTERVAL-INPUT - Joe Koshakow