title: How to consume messages in last N days using confluent-kafka-python?
body: <p>This question is similar to <a href="https://stackoverflow.com/questions/46402672/python-kafkaconsumer-start-consuming-messages-from-a-timestamp/46410623#46410623">Python KafkaConsumer start consuming messages from a timestamp</a> except I want to know how to do it in the official Python Kafka client by Confluent.</p>
  <p>I looked into the <a href="https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html#confluent_kafka.Consumer.offsets_for_times" rel="nofollow noreferrer">Consumer.offsets_for_times</a> function but I'm confused by that it accepts timestamps in the <code>TopicPartition.offset</code> field.</p>
  <p>How is a <code>offset</code> equivalent to a timestamp?</p>