Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 时区问题
The TiDB version is 5.3
Time zone variables:
mysql> show variables like ‘%zone%’;
±-----------------±--------+
| Variable_name | Value |
±-----------------±--------+
| system_time_zone | Etc/UTC |
| time_zone | +8:00 |
±-----------------±--------+
Question: The timestamp type data synchronized from MySQL is 8 hours less. Do I need to modify the system_time_zone variable value of TiDB or TiKV in tiup?
This is the system time zone, first check the OS settings.
The system time zones for TiDB, PD, and TiKV are all CST.
Directly inserting timestamp data in TiDB is normal, but the timestamp data synchronized from MySQL will be 8 hours less.
What tool did you use for synchronization? Did the synchronization process convert the timestamps?
The time zone parameters are consistent with MySQL, right? One is the database time zone, and the other is the system time zone.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.