Aleksey Yeschenko created CASSANDRA-4746:
--------------------------------------------

             Summary: cqlsh timestamp formatting is broken - displays wrong 
timezone info (at least on Ubuntu)
                 Key: CASSANDRA-4746
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4746
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 1.2.0 beta 1, 1.1.5
         Environment: 64-bit Ubuntu 12.04, python 2.7.3
            Reporter: Aleksey Yeschenko
            Assignee: Aleksey Yeschenko
            Priority: Minor
             Fix For: 1.1.6, 1.2.0 beta 2


cqlsh> create keyspace test with strategy_class = 'SimpleStrategy' AND 
strategy_options:replication_factor = 1;
cqlsh> use test;
cqlsh:test> create table ts (id int primary key, ts timestamp);
cqlsh:test> insert into ts (id, ts) values (1, '2012-05-14 07:53:20+0000');
cqlsh:test> select * from ts;
 id | ts
----+--------------------------
  1 | 2012-05-14 10:53:20+0000


Should've been 2012-05-14 10:53:20+0300.

cqlsh formats timestamps using '%Y-%m-%d %H:%M:%S%z' format-string and 'the %z 
escape that expands to the preferred hour/minute offset is not supported by all 
ANSI C libraries'. In this case it's just replaced with all zeroes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to