And I feel like a cow
I tried to insert this value '2014-09-07 00:00:00' in a TIMESTAMP column and it returns the next message:
Error Code: 1292. Incorrect datetime value: '2014-09-07 00:00:00' for column 'last_update' at row 1
However, if I try to insert the next value '2014-09-06 00:00:00' // day 06 instead of 07. it works.
'2014-09-07 01:00:00' // same day but different hour.
I tried on another machine (Windows Server) with the same result.
Then try this one
CREATE TABLE `dummy`(`timecol` TIMESTAMP NULL); insert into dummy(timecol) values('2014-09-07 00:00:00');
What's going on with 2014-09-07 at 0 hours?.
I have some theories about this date that involves the Illuminati.
It is the link to the bug report if you want to collaborate
ps: It is the third time that I found one of those weird bugs that happen in a specific case and a specific number.
This bug works (or fails) if:
- Windows uses the timezone of GMT -4:00 Santiago (with daily saving). But apparently, it doesn't work with other zones, including GMT -4::00 Atlantic Canada.
- And default-time-zone is not set in the configuration of MySQL (usually it is not set).
- And if we try to insert 2014-09-07 00:00:00 in a timestamp field (apparently it works with DateTime fields).
So this bug is triggered for a specific zone in a specific time and under a specific type of column.
Weird as f*.. (f* = funk)