hightekjonathan hightekjonathan - 9 months ago 102
MySQL Question

Invalid datetime format: 1292 Incorrect datetime value - Laravel 5.4

I did a fresh install of Laravel 5.4 using the official Laravel installer for Composer. I ran

php artisan make:auth
to create the system for login/register. The login page works when I manually enter in the user in the database, but my register page gives me the following error:

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2017-03-12 02:53:06' for column 'updated_at' at row 1


and

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2017-03-12 02:53:06' for column 'updated_at' at row 1 (SQL: insert into `users` (`name`, `email`, `password`, `updated_at`, `created_at`) values (Jonathan Stowe, john@doe.com, $2y$10$ukSU8/YktI88igoHxhgjdeahZhFZinoR.8vCNMpjv9CjeQRe.izsq, 2017-03-12 02:53:06, 2017-03-12 02:53:06))


Im using PHP v7.1.1, MySQL v5.6.35, Larval 5.4.*

Googling the error only showed info for custom made migrations, but not the default ones. Did I configure something wrong? Or is this a known error? I can supply any files needed.

Thank you in advance!

Answer Source

That time doesn't actually exist :) I'm assuming that you're timezone using something that is DST.

Between 2017-03-12 02:00:00 and 2017-03-12 02:59:59 that time just simply doesn't exist that's why you're getting that error.