Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started



lavaraja.padala_150810 avatar image
lavaraja.padala_150810 asked Erick Ramirez edited

Does a node with UTC timezone in a cluster of EDT nodes corrupt the data?

We have observed that one of the node is showing timezone as UTC while other nodes are running EDT time. What is the way to correct the problem?. Should changing time zone on the faulty node will resolve issue? If we run run repair on this node will it corrupt the data on other nodes since EDT time is behind UTC?.

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered

The node's timezone has no effect whatsoever on the state of the data that Cassandra stores.

In Cassandra, timestamps are timezone-naive since timestamps are encoded microseconds since Unix epoch -- the number of microseconds which have elapsed since midnight (00:00 UTC/GMT) January 1, 1970.

Regardless of the timezone of a server, the data is encoded with timestamps (microseconds since Unix epoch). The only difference a timezone makes is displaying the timestamps in local time.

For example, the timestamp 1596501496772880 is equivalent to the following dates/times in the following timezones:

  • UTC (GMT+0:00) - August 4, 2020 12:38:16.772 AM
  • PDT (GMT-7:00) - August 3, 2020 05:38:16.772 PM
  • BST (GMT+1:00) - August 4, 2020 01:38:16.772 AM
  • IST (GMT+5:30) - August 4, 2020 06:08:16.772 AM
  • AEST (GMT+10:00) - August 4, 2020 10:38:16.772 AM

In other words, timezones are a representation of the same underlying universal time displayed in a particular local time. Cheers!

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.