I want to generate random big data in MariaDB.
One of this columns is random timestamp which I generate like this:
select (current_timestamp - interval (rand() * 60 * 60 * 24 * 365 * 10) second ) as record_time;
Since the end of March there is a shift to daylight saving time / summer time, so in one day there is no time from 02:00 to 03:00. And when I inserting this data I get error like:
Incorrect datetime value: '2016-03-27 02:20:24.227322' for column db.tab1.record_time.
How to modify this part of insert script to generate correct random timestamp values while accepting daylight saving time?
Link to MariaDB info about timezones