You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I asked ChatGPT seems the result in TiDB is correct.
What is the Unix timestamp corresponding to 2020-10-25 03:45 in Vilnius, Lithuania?
On October 25, 2020, Lithuania (Vilnius) switched from Daylight Saving Time (EEST, UTC+3) to Standard Time (EET, UTC+2). The time change occurred at 03:00 local time, meaning the clock was set back from 03:00 to 02:00.
Key Question:
At 03:45 local time, was it still in Daylight Saving Time (UTC+3) or had it already switched to Standard Time (UTC+2)?
If it was still in DST (EEST, UTC+3) → The corresponding UTC time would be 2020-10-25 00:45.
If it was already in Standard Time (EET, UTC+2) → The corresponding UTC time would be 2020-10-25 01:45.
Now, calculating the Unix timestamps:
Unix timestamp 1 (UTC 00:45) → 1603586700
Unix timestamp 2 (UTC 01:45) → 1603590300
Since the time change occurred at 03:00, by 03:45, the region was already in Standard Time (EET, UTC+2).
Thus, the most likely Unix timestamp for 2020-10-25 03:45 (Vilnius time) is 1603590300.
What were the times before and after the time change?
On October 25, 2020, at 03:00 local time, Lithuania (Vilnius) switched from Daylight Saving Time (EEST, UTC+3) to Standard Time (EET, UTC+2). This meant that the clock was set back from 03:00 to 02:00. Below is the corresponding Unix timestamp information before and after the transition:
Before the transition (Daylight Saving Time, UTC+3)
Lithuania Time (EEST)
UTC Time
Unix Timestamp
2020-10-25 01:59:59
2020-10-24 22:59:59 UTC
1603576799
2020-10-25 02:00:00
2020-10-24 23:00:00 UTC
1603576800
2020-10-25 02:59:59
2020-10-24 23:59:59 UTC
1603580399
2020-10-25 03:00:00
2020-10-25 00:00:00 UTC
1603580400
(At this point, the clock is set back to 02:00:00 EET.)
Summary
Before 03:00 (EEST, UTC+3), the time followed UTC+3.
After 03:00 (EET, UTC+2), the time followed UTC+2.
The local time 02:00 - 02:59 appeared twice (once in DST and once in standard time).
Unix timestamps remained continuous and did not repeat, but local time between 02:00 - 02:59 had two different meanings, depending on whether it was before or after the transition.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
Returned time should be another mapped time.
4. What is your TiDB version? (Required)
nightly(fc8bdb5)
The text was updated successfully, but these errors were encountered: