I want to insert this value: 2020-03-29 01:00:00

If I set up a column called date with data type datetime I can insert the value. But if I use the data type timestamp I cannot insert and get an error message:

Incorrect datetime value: '2020-03-29 01:00:00' for column 'date' at row 1

Furthermore, if I insert 2020-03-29 02:00:00 using data type timestamp it works... seriously, what is going on here?

I am using the GMT timezone. I'm creating a 2020 calendar table where I want to insert every hour in a year. Should I skip that time?


2 Answers 2


This is because of the daylight time-saving change. You're trying to insert an unexisting timeframe, so we can call it the daylight saving gap.

Solution: Just skip that specific time in your table.

  • What about the other time change? When an hour repeats!
    – Rick James
    Dec 6, 2019 at 1:29

If you want to catch every hour that exists, have a sequence of integers and do


Where x is some constant base time and y is the sequence of hours. The result of the sum is a valid hour, suitably converted according to DST hours, leap years, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.