Cassandra
  1. Cassandra
  2. CASSANDRA-5046

cqlsh doesn't show correct timezone when SELECTing a column of type TIMESTAMP

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Fix Version/s: 1.1.8, 1.2.0 rc1
    • Component/s: None
    • Labels:
      None
    • Environment:

      cassandra 1.1.6 (DSE 2.2.1) or cassandra RC1 (from tip)

      Description

      trying to figure out if i'm doing something wrong or a bug. i am
      creating a simple schema, inserting a timestamp using ISO8601 format,
      but when retrieving the timestamp, the timezone is displayed
      incorrectly. i'm inserting using GMT, the result is shown with
      "+0000", but the time is for my local timezone (-0800)

      tried with 1.1.6 (DSE 2.2.1), and 1.2.0-rc1-SNAPSHOT

      here's the trace:

      bin/cqlsh
      Connected to Test Cluster at localhost:9160.
      [cqlsh 2.3.0 | Cassandra 1.2.0-rc1-SNAPSHOT | CQL spec 3.0.0 | Thrift
      protocol 19.35.0]
      Use HELP for help.
      cqlsh> CREATE KEYSPACE btoddb WITH replication =

      {'class':'SimpleStrategy', 'replication_factor':1}

      ;
      cqlsh>
      cqlsh> USE btoddb;
      cqlsh:btoddb> CREATE TABLE test (
      ... id uuid PRIMARY KEY,
      ... ts TIMESTAMP
      ... );
      cqlsh:btoddb>
      cqlsh:btoddb> INSERT INTO test
      ... (id, ts)
      ... values (
      ... '89d09c88-40ac-11e2-a1e2-6067201fae78',
      ... '2012-12-07T10:00:00-0000'
      ... );
      cqlsh:btoddb>
      cqlsh:btoddb> SELECT * FROM test;

      id | ts
      -------------------------------------+-------------------------
      89d09c88-40ac-11e2-a1e2-6067201fae78 | 2012-12-07 02:00:00+0000

      cqlsh:btoddb>

      1. 5046-1.2.txt
        0.6 kB
        Aleksey Yeschenko
      2. 5046-1.1.txt
        0.6 kB
        Aleksey Yeschenko

        Activity

        Gavin made changes -
        Workflow patch-available, re-open possible [ 12753740 ] reopen-resolved, no closed status, patch-avail, testing [ 12758901 ]
        Gavin made changes -
        Workflow no-reopen-closed, patch-avail [ 12741473 ] patch-available, re-open possible [ 12753740 ]
        Aleksey Yeschenko made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Aleksey Yeschenko made changes -
        Reviewer brandon.williams jbellis
        Aleksey Yeschenko made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Aleksey Yeschenko made changes -
        Fix Version/s 1.1.8 [ 12323574 ]
        Fix Version/s 1.2.0 rc1 [ 12323481 ]
        Aleksey Yeschenko made changes -
        Reviewer brandon.williams
        Aleksey Yeschenko made changes -
        Attachment 5046-1.1.txt [ 12560096 ]
        Aleksey Yeschenko made changes -
        Attachment 5046-1.2.txt [ 12560095 ]
        Aleksey Yeschenko made changes -
        Field Original Value New Value
        Assignee Aleksey Yeschenko [ iamaleksey ]
        B. Todd Burruss created issue -

          People

          • Assignee:
            Aleksey Yeschenko
            Reporter:
            B. Todd Burruss
            Reviewer:
            Jonathan Ellis
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development