[ 
https://issues.apache.org/jira/browse/CASSANDRA-17467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17510914#comment-17510914
 ] 

Brandon Williams commented on CASSANDRA-17467:
----------------------------------------------

In CASSANDRA-15976, we switched from using 
[SimpleDateFormat|https://docs.oracle.com/javase/10/docs/api/java/text/SimpleDateFormat.html]
 to 
[DateTimeFormatter|https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html]
 which have _nearly_ identical formats.  Previously this case was caught by the 
'yyyy-MM-dd HH:mm:ss z' SDF pattern, but 'z' in DTF format does not cover this 
and instead needs the 'X' identifier.

||Branch||CI||
|[4.0|https://github.com/driftx/cassandra/tree/CASSANDRA-17467-4.0]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/405/workflows/1bab3bb5-abf9-4a0e-9ff0-c40288b27038]
 , 
[j11|https://app.circleci.com/pipelines/github/driftx/cassandra/405/workflows/cd5d68ca-c145-4be8-a057-3aca3c350b56]|
|[trunk|https://github.com/driftx/cassandra/tree/CASSANDRA-17467-trunk]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/404/workflows/693a48ec-0e75-461d-9ec2-4ed272470622]
 , 
[j11|https://app.circleci.com/pipelines/github/driftx/cassandra/404/workflows/25b0fc44-4770-4cc0-bf82-c76651419818]|


> Timestamp issue with Cassandra 4.0.3 with Timezone value
> --------------------------------------------------------
>
>                 Key: CASSANDRA-17467
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17467
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL/Syntax
>            Reporter: Anand B
>            Assignee: Brandon Williams
>            Priority: Normal
>             Fix For: 4.0.x, 4.x
>
>
> Hello Team ,
>  
> Facing one issue related to the timestamp type in cassandra 4.0.3 version . 
> This is not repro in 3.11.x and works fine in 3.11.
>  
> when i have table with timestamp as fields :
>  
> CREATE TABLE timetest (
>     id int PRIMARY KEY,
>     enddate timestamp,
>     startdate timestamp
> )
> *Now when try to insert the record like :*
> INSERT INTO timetest (id,startdate,enddate) VALUES (1 ,'2022-03-20 12:48:56 
> +0530','2022-03-20 12:48:56 +0530')
> I am receiving error:
>  
> "{color:#de350b}InvalidRequest{color}: Error from server: code=2200 [Invalid 
> query] message="Unable to parse a date/time from '2022-03-20 12:48:56 +0530'".
>  ** 
> *This works fine on 3.11 but fails on 4.x.*
>  
> *same issue if we query the record:*
>  
> select * from timetest where id = 1 and enddate = '2022-03-20 12:48:56 +0530';
> {color:#de350b}InvalidRequest{color}: Error from server: code=2200 [Invalid 
> query] message="Unable to parse a date/time from '2022-03-20 12:48:56 +0530'"
>  
>  
> {color:#ffab00}*If we change the timestamp value and remove the extra space 
> which is present before the timezone value then it works fine in 4.x*{color}
>  
> if we change timestamp value From {'2022-03-20 12:48:{color:#de350b}56 
> +0530{color}'}  To    {'2022-03-20 12:48:{color:#ffab00}56+0530{color}’} then 
> 4.0.3 accept this value otherwise not. but 3.11 was accepting both the values.
>  
> This is causing a challenge for upgrading from 3.11 to 4.x.
>  
> Seeking help on this issue and any fix / workaround or suitable Cassandra 
> version which is higher than 3.11 but lesser then 4.0.3 which can be used to 
> fix this issue asap.
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to