The checkpoint time of the CDC program is inconsistent with the local time

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: cdc程序checkpoint时间与本地时间不一致

| username: liyuntang

Currently, we are using a self-built k8s environment to deploy the v5.4.1 version of the TiDB cluster. When checking the status of the CDC synchronization task, we found that the checkpoint time does not match the local time, which can easily cause misunderstandings. After several attempts, we still cannot modify this time. How should we handle this issue?

Methods already tried:

  1. Logged into the CDC container and mapped /usr/share/zoneinfo/Asia/Shanghai from the host to /etc/localtime in the container.
  2. Mounted /etc/localtime from the host using a volume.
  3. Set timezone: System in the tidb-cluster.yaml file.

None of the above measures have worked.

| username: db_user | Original post link

May I ask where this synchronization is going, and what is the time_zone situation downstream?

| username: ShawnYan | Original post link

It happens to be 8 hours off. If it’s CentOS 7, it’s recommended to check with timedatectl first.