1

I'm producing data and comsuming it using Kafka. In the consumer, I print the consumed data using the following code:

consumer = connect_kafka_consumer()
for message in consumer:
    print (message)

Here is the output of one line:

ConsumerRecord(topic='states', partition=0, offset=7214, timestamp=1603507387101, timestamp_type=0, key=None, value={'sequence': 1354, 'State': 'WA'}, headers=[], checksum=4012375034, serialized_key_size=-1, serialized_value_size=250, serialized_header_size=-1)

My question is about the timestamp, which I can get using message.timestamp. Which timezone is that? Is default timezone UTC? And how can I tell consumer to change this processing time to another timezone? Thanks

mah65
  • 578
  • 10
  • 20

1 Answers1

-3

that is the epoch time, so it is independent of any timezone. You may convert it to human-readable time using any epoch convertor(online here https://www.epochconverter.com/)