Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cassandra-更新时间戳列工作不正常_Cassandra_Timestamp_Cassandra 2.0_Cqlsh - Fatal编程技术网

Cassandra-更新时间戳列工作不正常

Cassandra-更新时间戳列工作不正常,cassandra,timestamp,cassandra-2.0,cqlsh,Cassandra,Timestamp,Cassandra 2.0,Cqlsh,正在尝试更新Cassandra数据库中的Timestamp列 update sample set date='2016-10-21 19:15:10.000' where rowkey=1; 当我检查结果时,时间少于5:30小时 输出: 2016-10-21 13:45:10.000000+0000 这与Locale有关吗?我尝试使用相同的输出以编程方式更新相同的内容。这是因为cqlsh按照版本2.1.9、2.2.1和3.0(beta版)仅以UTC显示时间戳。在版本2.2.6、3.0.4和3

正在尝试更新
Cassandra
数据库中的
Timestamp

update sample set date='2016-10-21 19:15:10.000' where rowkey=1;
当我检查结果时,时间少于
5:30小时

输出:

2016-10-21 13:45:10.000000+0000

这与
Locale
有关吗?我尝试使用相同的输出以编程方式更新相同的内容。

这是因为cqlsh按照版本2.1.9、2.2.1和3.0(beta版)仅以UTC显示时间戳。在版本2.2.6、3.0.4和3.4中,它固定为在应用本地时区偏移时显示时间戳


如果这是您的问题,升级到Cassandra的最新版本应该可以纠正这种行为。

谢谢,但我们使用的是
DataStax Cassandra版本3.9
而不是旧版本。它是否仅在特定版本(如2.2.6、3.0.4、3.4)中修复?Shankar否,它也应该在这些版本之后修复。但我想它可能是以某种方式被还原的。