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

Ralf Steppacher edited comment on CASSANDRA-11137 at 2/9/16 7:48 AM:
---------------------------------------------------------------------

My original issue was with the Java driver. I just used cqlsh to demonstrate 
the issue.

Personally I think that adding the timezone is the correct fix. Every datetime 
library will do the "right thing" if the information is included. 


was (Author: ralfsteppacher):
My original issue was with the Java driver. I just used cqlsh to demonstrate 
the issue. (The examples in the ticket description use two different table 
names but they should be the same table. I cannot edit the description.)

Personally I think that adding the timezone is the correct fix. Every datetime 
library will do the "right thing" if the information is included. 

> JSON datetime formatting needs timezone
> ---------------------------------------
>
>                 Key: CASSANDRA-11137
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11137
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL
>            Reporter: Stefania
>
> The JSON date time string representation lacks the timezone information:
> {code}
> cqlsh:events> select toJson(created_at) AS created_at from 
> event_by_user_timestamp ;
>  created_at
> ---------------------------
>  "2016-01-04 16:05:47.123"
> (1 rows)
> {code}
> vs.
> {code}
> cqlsh:events> select created_at FROM event_by_user_timestamp ;
>  created_at
> --------------------------
>  2016-01-04 15:05:47+0000
> (1 rows)
> cqlsh:events>
> {code}
> To make things even more complicated the JSON timestamp is not returned in 
> UTC.
> At the moment {{DateType}} picks this formatting string {{"yyyy-MM-dd 
> HH:mm:ss.SSS"}}. Shouldn't we somehow make this configurable by users or at a 
> minimum add the timezone?



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

Reply via email to