vendredi 21 février 2020

Incorrect datetime value 1292 laravel 5.7 just from a specific date

I saw this error questions and answers but my case is a little bit weird!

I'm using Laravel 5.7 with these database settings:

        'mysql' => [
            'driver' => 'mysql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'unix_socket' => env('DB_SOCKET', ''),
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => '',
            'prefix_indexes' => true,
            'strict' => true,
            'engine' => null,
        ],

One of my tables records user birth date with timestamp format.

This works fine till user age is smaller than 1969-02-22 00:00:00; means 1970-02-22 00:00:00 is OK but first one occurs an error!

Do you have any Idea about this case?



via Chebli Mohamed

1 commentaire:

  1. If you're trying to lose weight then you certainly need to start following this totally brand new custom keto meal plan diet.

    To create this keto diet, certified nutritionists, personal trainers, and professional chefs joined together to provide keto meal plans that are powerful, decent, economically-efficient, and delightful.

    Since their grand opening in 2019, hundreds of people have already transformed their body and health with the benefits a proper keto meal plan diet can offer.

    Speaking of benefits: in this link, you'll discover eight scientifically-confirmed ones offered by the keto meal plan diet.

    RépondreSupprimer