-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some tables in information_schema doesn't present times in correct timezone. #24858
Labels
Comments
jingshanglu
added
severity/critical
sig/execution
SIG execution
sig/transaction
SIG:Transaction
and removed
sig/execution
SIG execution
labels
May 24, 2021
Closed
MyonKeminta
changed the title
Tables of Lock View doesn't present times in correct timezone.
Some tables in information_schema doesn't present times in correct timezone.
May 28, 2021
Looks like this was fixed at least for this table/column.
|
This might be a data type issue. For these columns that hold a date and time to work correctly they should be a
An example of this with
Related: #29771 |
This was referenced Nov 17, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug Report
1. Minimal reproduce step (Required)
select * from information_schema.tidb_trx
orselect * from information_schema.deadlocks
2. What did you expect to see? (Required)
For the Timestamp typed fields, it shows the time according to the timezone in the current session.
3. What did you see instead (Required)
It always shows a fixed timezone.
4. What is your TiDB version? (Required)
master
This issue is initially found in Lock View while it's in development. But later it's found that this issue also exists in some other system tables.
Example (
statements_summary
):In normal user-created tables (
create table t (id int primary key, t timestamp)
):It's also found that the implementation of
statements_summary
usestime.Unix
directly without any timezone conversion:tidb/util/stmtsummary/statement_summary.go
Lines 871 to 873 in 348abf0
As I understood it, it will cause the query result depends on the system timezone of the host of that TiDB process.
The text was updated successfully, but these errors were encountered: