Closed HuSharp closed 1 month ago
why not change tidb_runaway_watch
to local time?
because tidb_runaway_watch
is datetime
, which is different from timestamp
, and can not convert UTC to local time automatically.
https://github.com/pingcap/tidb/blob/e5a8a23e836a99b95db201f412cb7fdd9c811c5f/pkg/session/bootstrap.go#L635-L646
This means the timezone information will be lost, and the user will not know which timezone to switch to when in crossing time zones (the user needs to confirm the local time zone on the server side).
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Currently
tidb_runaway_watch
relies on structQuarantineRecord
to store time as UTC, whileRUNAWAY_WATCHES
directly selectstidb_runaway_watch
to convert to local time.2. What did you expect to see? (Required)
RUNAWAY_WATCHES
displays UTC as well.3. What did you see instead (Required)
RUNAWAY_WATCHES
displays local time whiletidb_runaway_watch
displays UTC4. What is your TiDB version? (Required)
master