Search code examples
cassandra

Timezone change for Cassandra cluster


Who knows how Kafka will behave when changing time zones? We are soon switching from UTC +6 to UTC +5. Will simply changing the settings in NTP or Chrony resolve this issue? Perhaps someone has practical experience dealing with this?


Solution

  • Cassandra operates independently of the system timezone and so it is not affected by timezone changes.

    CQL data types store time usually in GMT. For example, the CQL timestamp type is encoded as a 64-bit signed integer representing the number of milliseconds since Unix epoch (1 Jan 1970 00:00:00 GMT).

    It might seem like the data is stored in the local timezone but it is the apps and clients (such as cqlsh) that decide how the data is displayed based on the configured format. Cheers!