Skip to content

expression: Non-existing local timestamps during DST spring forward got converted to 0 instead of getting the transition timestamp #28739

Closed
@kennytm

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

set time_zone = 'Europe/Vilnius';
select unix_timestamp('2020-03-29 03:45:00');

2. What did you expect to see? (Required)

On MySQL 8.0, after the server time zone got populated:

mysql> select unix_timestamp('2020-03-29 03:45:00');
+---------------------------------------+
| unix_timestamp('2020-03-29 03:45:00') |
+---------------------------------------+
|                            1585443600 |
+---------------------------------------+
1 row in set (0.00 sec)

(Note: 1,585,443,600 = 2020-03-29 01:00:00 UTC, the instant when the spring forward happens)

3. What did you see instead (Required)

mysql> select unix_timestamp('2020-03-29 03:45:00');
+---------------------------------------+
| unix_timestamp('2020-03-29 03:45:00') |
+---------------------------------------+
|                                     0 |
+---------------------------------------+
1 row in set (0.15 sec)

4. What is your TiDB version? (Required)

Release Version: v5.2.1
Edition: Community
Git Commit Hash: cd8fb24c5f7ebd9d479ed228bb41848bd5e97445
Git Branch: heads/refs/tags/v5.2.1
UTC Build Time: 2021-09-08 02:32:56
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions