I have a table in the cassandrum with the timestamp's datatype. I am using cqlsh to get data from a database And want to change the output format to see how my timestamp column output is displayed. I researched around and found that I can change timestamp output format by changing the following file:
- ~ / .cassandra / cqlshrc
But I have learned that I can make only one change, the elements of time, I can not output to display my timestamp in a different timezone (say UTC). It always displays timestamps in their local timezone.
I want to know if there is a way that I can make a cqlsh display timestamp in my desired time zone, or at least in the UTC zone.
Any help or suggestion is appreciated.
I am using the following versions:
cqlsh 4.1.1 | Cassandra 2.0.6 | SQL Speak 3.1.1
Thanks
To change your environment variable Show time zone:
TZW = America / Los_Egels cqlsh -k mpj `hostname` -e 'Select time from user limit 3' time ---------- ---- ------------ 2015-02-15 21: 17: 03-0800 2015-02-15 18: 16: 21-0800 2015-02-15 00: 04: 52 -0800 (3 rows)
and:
tees = UTC cqlsh -k mpj `e 'user name select from time to time' 3 'time ---- ---------------------- 2015-02-16 05:17: 03 + 0000 2015-02-16 02:16:16: 21 + 0000 2015-02- 15 08: 04: 52 + 0000 (3 lines)
Comments
Post a Comment