I was trying to seed laravel app with faker and their is a column valid_to
where I did try to use below code and got the error as following:
error:
SQLSTATE[22007]:
Invalid datetime format:
1292 Incorrect datetime value:
'2039-01-16 15:21:43' for column 'valid_to'
code:
$faker->dateTimeBetween($startDate = 'now', $endDate = '+20 years', $timezone = null),
Issue is, as I changed to +20 years
to `+10 years, the code is working.
below is the code which worked for me.
$faker->dateTimeBetween($startDate = 'now', $endDate = '+10 years', $timezone = null),
Is this the limitation for timestamp
field in DB (Mysql)
?