Bugs item #2814614, was opened at 2009-06-30 16:05
Message generated for change (Tracker Item Submitted) made by g2balint
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2814614&group_id=56967
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: SQL "stable"
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: gbalint (g2balint)
Assigned to: Niels Nes (nielsnes)
Summary: BC leap years handled incorrectly
Initial Comment:
MonetDB handles BC timestamps, however it fails on feb 29 dates in leap years.
For a non-leap year, subtracting 1 from a 03-01 timestamps works:
sql>select cast('-4-03-01' as timestamp)-1;
+----------------------------+
| sql_sub_single_value |
+============================+
| -4-02-28 23:59:59.000000 |
+----------------------------+
1 tuple
But for a leap year it returns nil:
sql>select cast('-5-03-01' as timestamp)-1;
+----------------------------+
| sql_sub_single_value |
+============================+
| nil 23:59:59.000000 |
+----------------------------+
1 tuple
You also can not instantiate it explicitly:
sql>select cast('-5-02-29' as timestamp)-1;
!SQLException:timestamp:conversion of string '-5-02-29' failed
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2814614&group_id=56967
------------------------------------------------------------------------------
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs