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

[jira] [Comment Edited] (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:comment-tabpanel&focusedCommentId=15788138#comment-15788138 ] 

Tyler Hobbs edited comment on CASSANDRA-13076 at 12/30/16 6:43 PM:
-------------------------------------------------------------------

Can you provide the script that you're using to insert and fetch the data?


was (Author: thobbs):
Can you provide the script that you're using to insert the data?

> 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 5.0.1 | Cassandra 3.9 | CQL spec 3.4.2 | Native protocol v4
>            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 that is a multiple of 100, 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)