cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Geyer (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-13076) unexpected leap year differences for years between 0 and 1583
Date Thu, 22 Dec 2016 22:02:58 GMT
Jens Geyer created CASSANDRA-13076:
--------------------------------------

             Summary: unexpected leap year differences for years between 0 and 1583
                 Key: CASSANDRA-13076
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13076
             Project: Cassandra
          Issue Type: Bug
         Environment: cqlsh
            Reporter: Jens Geyer


When inserting timestamps into a datetime column that are between year 0 and 1583, there are
unexpected differences between the CQL statement and the actual data written into the field.


Testcase: Insert 1st of february for each year starting from 0 up to 3000. We see changing
the difference each leap year, and finally with the calendar reform of 1583. 

{code}
read 30.01.0001 00:00:00 +00:00, difference -2 days
read 31.01.0101 00:00:00 +00:00, difference -1 days
read 01.02.0201 00:00:00 +00:00, difference 0 days
read 02.02.0301 00:00:00 +00:00, difference 1 days
read 03.02.0501 00:00:00 +00:00, difference 2 days
read 04.02.0601 00:00:00 +00:00, difference 3 days
read 05.02.0701 00:00:00 +00:00, difference 4 days
read 06.02.0901 00:00:00 +00:00, difference 5 days
read 07.02.1001 00:00:00 +00:00, difference 6 days
read 08.02.1101 00:00:00 +00:00, difference 7 days
read 09.02.1301 00:00:00 +00:00, difference 8 days
read 10.02.1401 00:00:00 +00:00, difference 9 days
read 11.02.1501 00:00:00 +00:00, difference 10 days
read 01.02.1583 00:00:00 +00:00, difference 0 days
{code}

So what it looks like is that there seems to be an inconsistency between calendar systems.







--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message