You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jens Geyer (JIRA)" <ji...@apache.org> on 2016/12/22 22:04:58 UTC

[jira] [Updated] (CASSANDRA-13076) unexpected leap year differences for years between 0 and 1583

     [ https://issues.apache.org/jira/browse/CASSANDRA-13076?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jens Geyer updated CASSANDRA-13076:
-----------------------------------
    Description: 
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 after the calendar reform of 1582. 

{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. 




  was:
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. 





> 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 after the calendar reform of 1582. 
> {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)