Cassandra 卡桑德拉显示不同的时区

Cassandra 卡桑德拉显示不同的时区,cassandra,timezone,Cassandra,Timezone,当我启动cassandra时,显示的时间是正确的。它在利用我的机器。然而,在插入数据时,我使用的是时间戳列。时间戳使用UTC时区。我希望两次都同步 启动cassandra时: INFO [main] 2017-07-25 11:46:57,933 StorageService.java:2248 - Node localhost/127.0.0.1 state jump to NORMAL 在第列中: seq | age | city | dollar | first

当我启动cassandra时,显示的时间是正确的。它在利用我的机器。然而,在插入数据时,我使用的是时间戳列。时间戳使用UTC时区。我希望两次都同步

启动cassandra时:

INFO  [main] 2017-07-25 11:46:57,933 StorageService.java:2248 - Node localhost/127.0.0.1 state jump to NORMAL
在第列中:

 seq     | age | city      | dollar | first     | last    | last_modified                   | pick | state     | street          | zip 
 --------+-----+-----------+--------+-----------+---------+--------------------------------+------+-----------+-----------------+--------
 2100005 |  23 | Bangalore | $40000 | Sushmitha | Vegesna | 2017-07-25 06:19:12.950000+0000 | BLUE | Karnataka | 10th cross road | 500049
启动cassandra时:

INFO  [main] 2017-07-25 11:46:57,933 StorageService.java:2248 - Node localhost/127.0.0.1 state jump to NORMAL
INFO[main]2017-07-25 11:46:57933 StorageService.java:2248-Node localhost/127.0.0.1状态跳转到正常状态

这是casssandra在控制台/日志文件上打印的日志。。。它使用您的系统日期时间

将数据插入cassandra时,可以手动指定时区,以使用特定时区

Insert into table (timestamp_column1) values ('2017-07-25 00:00:00+0530');
当使用cqlsh查询数据时,时间戳列将使用.cqlshrc文件中设置的时区值显示。。默认值为UTC时区。 要更改显示时区,请在.cqlshrc文件中进行以下更改

[ui]
;; Display timezone
timezone = Etc/UTC

我没有找到任何.cqlshrc文件,而是找到了cqlshrc.sample文件,并在其中进行了更改。但是输出没有变化。如果使用windows。。。cqlshrc文件需要在
C:\user\your_user\.cassandra
我正在使用Ubuntu.try
找到cqlshrc
。。。或者,如果未指定时区,则使用处理写入请求的Cassandra coordinator节点的时区。为确保准确性,DataStax建议指定时区,而不是依赖于Cassandra节点上配置的时区。。。。。