Bug #106018 datetime insert fails with [Err code 1292 ] only when try '2015-03-29 02:54:02'
Submitted: 31 Dec 2021 21:17 Modified: 31 Dec 2021 22:00
Reporter: Franco Zipoli Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:8.0 OS:Windows (Win 10)
Assigned to: CPU Architecture:Any (x64)

[31 Dec 2021 21:17] Franco Zipoli
Description:
The date in this insert generates the error 1292:
INSERT INTO `logs_2015` (`id`,`datetime`,`code`,`desc` )  VALUES(10012, '2015-03-29 02:54:02', '4', 'SEQUENZE');

While these two (one day before and one day after) do not give problems:
INSERT INTO `logs_2015` (`id`,`datetime`,`code`,`desc` )  VALUES(10013, '2015-03-28 02:54:02', '4', 'SEQUENZE');
INSERT INTO `logs_2015` (`id`,`datetime`,`code`,`desc` )  VALUES(10014, '2015-03-30 02:54:02', '4', 'SEQUENZE');

All the other dates also seem to give no problems.

How to repeat:
try to insert in a TIMESTAMP field with this date: '2015-03-29 02:54:02'
[31 Dec 2021 22:00] MySQL Verification Team
Thank you for the bug report. Probably your issue is timezone in daylight time saving (DST) which is invalid time:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.27 MySQL Community Server - GPL

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql 8.0 > use test
Database changed
mysql 8.0 > create table bug (id int auto_increment not null primary key, thetime timestamp);
Query OK, 0 rows affected (0.03 sec)

mysql 8.0 > insert into bug values (null, '2015-03-29 02:54:02');
Query OK, 1 row affected (0.01 sec)

mysql 8.0 > select * from bug;
+----+---------------------+
| id | thetime             |
+----+---------------------+
|  1 | 2015-03-29 02:54:02 |
+----+---------------------+
1 row in set (0.01 sec)

mysql 8.0 >