Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

Changing timezone in cassandra



I am working on cassandra 3.0 and I am struck at how to change the default time zone in cassandra. Default is Greenwich time or UTC or +00:00 offset. I need to convert the default time to another timezone. I tried many sources and I am not able to figure it out.

For example: When doing a query like this: "select * from table WHERE time > 11:00 (HH:mm) AND time < 15"

The result is: all times between 11:00 and 13:00 which is wrong. The result has to be 12:00, 13:00 and 14:00.

My actual time zone is +01:00.

Thanks in advance.



Fixed this problem by creating and using the cqlshrc file like this:

I used "CET" for my timezone and it works so far.

New Contributor

Hi @Salda Murrah,

Created cqlshrc file like that and moved it to .cassandra folder.

Changed "Display Timezone" parameter to "Europe/Minsk" and "UTC+3" but still, its not working.

What should i do?


Hi @Salda Murrah

I could not figure it how you solved this.

I changed timezone parameter to "UTC+3" in cqlshrc but still its not working.

Should i change datetimeformat?

All i need is to change it to UTC+3 since C* uses UTC by default.

Can you help me with that?