From: | "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #1180: incorrect date handling |
Date: | 2004-06-23 02:32:49 |
Message-ID: | 20040623023249.EB659CF499C@www.postgresql.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 1180
Logged by: Ben Bidner
Email address: vort(at)wiretapped(dot)net
PostgreSQL version: 7.3.2
Operating system: linux 2.4.20
Description: incorrect date handling
Details:
colony=# CREATE TABLE foo (dtime TIMESTAMP);
CREATE TABLE
colony=# insert into foo values ('2003-12-11 23:59:60.00');
ERROR: Bad timestamp external representation '2003-12-11 23:59:60.00'
colony=# insert into foo values ('2003-12-11 23:59:59.999999');
INSERT 97940618 1
colony=# select * from foo;
dtime
----------------------------
2003-12-11 23:59:59.999999
(1 row)
^-- correct
colony=# insert into foo values ('2003-12-11 23:59:59.9999999');
INSERT 97940623 1
colony=# select * from foo;
dtime
----------------------------
2003-12-11 23:59:59.999999
2003-12-11 23:59:60.00
(1 row)
^-- incorrect
2003-12-11 23:59:60.00 should equal 2003-12-12 00:00:00
under 7.4.2, (had a friend test it out) inserting a timestamp with a time of
23:59:60.00 is allowed, it just increments the day and sets the time to
00:00:00 (as one would expect). However it still allows you to insert the
time as `23:59:59.9999999` and it updates the time (incorrectly) to
`23:59:60.00` instead of incrementing the day and setting the time to
00:00:00 (since 23:59:60 is .. or should be invalid).
vort(at)wiretapped(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-06-23 03:25:41 | Re: BUG #1180: incorrect date handling |
Previous Message | Kris Jurka | 2004-06-22 22:36:23 | Re: BUG #1177: JDBC driver doesn't handle all dates correctly |