Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-4746

cqlsh timestamp formatting is broken - displays wrong timezone info (at least on Ubuntu)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.1.7, 1.2.0 beta 2
    • None
    • 64-bit Ubuntu 12.04, python 2.7.3

    • Low

    Description

      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.

      Attachments

        1. 4746-1.1.txt
          1 kB
          Aleksey Yeschenko
        2. 4746.txt
          1 kB
          Aleksey Yeschenko

        Issue Links

          Activity

            People

              aleksey Aleksey Yeschenko
              aleksey Aleksey Yeschenko
              Aleksey Yeschenko
              Brandon Williams
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: