pingcap / pingcap/tidb

ensure consistent time zone behavior between TiDB and TiKV

Open
#49,848 2 comments 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement
related issues:
https://github.com/pingcap/tidb/issues/49586
https://github.com/pingcap/tidb/issues/29427
https://github.com/tikv/tikv/issues/16220

TiDB calculates time zones using the system's built-in tzinfo database, while TiKV calculates time zones using the embedded tzinfo database in the TiKV code (current version is 2018; fixed version is 2020). Therefore, when encountering time zones with DST rule changes after 2018, there are inconsistencies in the calculated results.
In https://github.com/pingcap/tidb/issues/49586, the client's scenario is Brazil, where DST was discontinued from 2020 to 2023. However, TiKV incorrectly assumes that Brazil still follows DST during calculations.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.