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

Stefan Podkowinski edited comment on CASSANDRA-10397 at 2/12/16 2:11 PM:
-------------------------------------------------------------------------

I've now created a patch for this that would use pytz and tzlocal for automatic 
timezone conversion. The code will fallback to UTC in case the modules could 
not be found:

[CASSANDRA-10397-2.2|https://github.com/apache/cassandra/compare/cassandra-2.2...spodkowinski:CASSANDRA-10397-2.2]
 

I'm still wondering about the best way to handle absence of the libs. Users 
should at least get a warning in case pytz is missing and a TZ environment 
value set.

[~pauloricardomg], [~aploetz], any thoughts on that?


was (Author: spo...@gmail.com):
I've now created a patch for this that would use pytz and tzlocal for automatic 
timezone conversion. The code will fallback to UTC in case the modules could 
not be found:

[CASSANDRA-10000-2.2|https://github.com/apache/cassandra/compare/cassandra-2.2...spodkowinski:CASSANDRA-10000-2.2]
 

I'm still wondering about the best way to handle absence of the libs. Users 
should at least get a warning in case pytz is missing and a TZ environment 
value set.

[~pauloricardomg], [~aploetz], any thoughts on that?

> CQLSH not displaying correct timezone
> -------------------------------------
>
>                 Key: CASSANDRA-10397
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10397
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Ubuntu 14.04 LTS
>            Reporter: Suleman Rai
>            Assignee: Stefan Podkowinski
>              Labels: cqlsh
>
> CQLSH is not adding the timezone offset to the timestamp after it has been 
> inserted into a table.
> create table test(id int PRIMARY KEY, time timestamp);
> INSERT INTO test(id,time) values (1,dateof(now()));
> select *from test;
> id | time
> ----+---------------------
>   1 | 2015-09-25 13:00:32
> It is just displaying the default UTC timestamp without adding the timezone 
> offset. It should be 2015-09-25 21:00:32 in my case as my timezone offset is 
> +0800.



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

Reply via email to