title: Mysql Invalid datetime format: 1292 Incorrect datetime value when creating some dummy data for testing
body: <p>When inserting some rows into the table I get this error:</p>
  
  <blockquote>
    <p>SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2017-03-26 02:00:00' for column 'created
    _at'
      at row 1</p>
  </blockquote>
  
  <p>I am inserting in correct format: Y-m-d H:i:s so what is causing the problem?</p>
  
  <p>Update:</p>
  
  <pre><code>CREATE TABLE `posts` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `excerpt` text COLLATE utf8mb4_unicode_ci,
    `body` text COLLATE utf8mb4_unicode_ci NOT NULL,
    `image_path` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `slug` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `markdown` tinyint(1) NOT NULL DEFAULT '0',
    `published` tinyint(1) NOT NULL DEFAULT '0',
    `views` int(10) UNSIGNED NOT NULL DEFAULT '0',
    `user_id` bigint(20) UNSIGNED NOT NULL,
    `published_at` datetime DEFAULT NULL,
    `deleted_at` timestamp NULL DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  </code></pre>
  
  <p>I am using a loop of 500 repetitions to insert dummy data into this table, it managed to insert 472 posts and then failed with above error. </p>
  
  <p>Here is how generated sql query looks like, I am not writting it my self, but framework I use generates it when I use php objects and methods for create etc</p>
  
  <pre><code>    "query" =&gt; "insert into `posts` (`user_id`, `title`, `excerpt`, `body`, `s
  lug`, `image`, `created_at`, `updated_at`, `published_at`, `published`, `views`) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)3
  8;5;208m"
      "bindings" =&gt; array:11 [
        0 =&gt; 1
        1 =&gt; "Enim autem et quis consequatur vel deleniti et."
        2 =&gt; "Voluptatibus nobis et et quaerat at inventore incidunt et qui ea co"
        3 =&gt; """
          Soluta distinctio dolorem ut officiis dolores quisquam esse sint. Repellendus est atque enim
   quia.\n
          """
        4 =&gt; "ab-itaque-facilis-culpa-suscipit-et-ratione-doloremque"
  
        5 =&gt; "post_img_1.jpg"
        6 =&gt; "2017-03-06 10:00:00"
        7 =&gt; "2017-03-06 10:00:00"
        8 =&gt; "2017-03-06 17:00:00"
        9 =&gt; true
        10 =&gt; 49
      ]
      "time" =&gt; 29.97
  </code></pre>