pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Berg <myon@debian.org>
To: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Subject: time values past 24:00:00 (or rather 23:59:60)
Date: Wed, 20 May 2020 14:58:07 +0200
Message-ID: <20200520125807.GB296739@msg.df7cb.de> (raw)

This is ok:

# select '23:59:60'::time;
   time
──────────
 24:00:00

# select '23:59:61'::time;
ERROR:  22008: date/time field value out of range: "23:59:61"

This is not ok:

# select '23:59:60.999'::time;
     time
──────────────
 24:00:00.999

-- value isn't read back:
# select '24:00:00.999'::time;
ERROR:  22008: date/time field value out of range: "24:00:00.999"

-- we can even go to :01
# select '23:59:60.9999999'::time;
   time
──────────
 24:00:01


PG 12.3.

Christoph





view thread (4+ messages)  latest in thread

Message-ID: <20200520125807.GB296739@msg.df7cb.de>
Permalink:  ../20200520125807.GB296739@msg.df7cb.de/
Also on:    postgresql.org/message-id/20200520125807.GB296739@msg.df7cb.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: myon@debian.org
  Subject: Re: time values past 24:00:00 (or rather 23:59:60)
  In-Reply-To: <20200520125807.GB296739@msg.df7cb.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox