I kept getting this error, when trying to edit a user profile:
Incorrect datetime value: '1970-01-01 00:00:00' for column 'created_at'
Tried lots of things.
Like changing all migration files in vendortcgvoyagerpublishabledatabasemigrations
This:
$table->timestamps();
into:
$table->nullableTimestamps('updated_at')->useCurrent();
$table->nullableTimestamps('created_at')->useCurrent();
And experiments with CURRENT_TIMESTAMP...
But nothing worked.
So eventually I hacked this file:
vendortcgvoyagersrcHttpControllersController.php
I added this:
if ($content == '1970-01-01 00:00:00') $content = null;
to
`/** TIMESTAMP TYPE **/
case 'timestamp':
if ($request->isMethod('PUT')) {
$content = gmdate('Y-m-d H:i:s', strtotime($request->input($row->field)));
//-------------------------------------------------------------
// $content: '1970-01-01 00:00:00' can break update queries:
// SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '1970-01-01 00:00:00' for column 'created_at'
// Setting to null instead avoids this problem:
if ($content == '1970-01-01 00:00:00') $content = null;
//-------------------------------------------------------------
}
break;
`
Eh voil谩 - no more problems. :-)
But of course this is a very ugly and primitive hack....
If anyone has a more elegant solution, let me know?
Please update your users BREAD to prevent updating created_at column like so:

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Most helpful comment
Please update your users BREAD to prevent updating created_at column like so: