title: Insert Date and time in dataBase using Laravel 5.4
body: <p>I want to insert Date of the current day and time, here is my code : </p>
  
  <pre><code>$test = new Test;
  
  $dt = new DateTime;
  
  $test-&gt;date = $dt-&gt;format('m-d-y H:i:s');
  $test-&gt;users_id = Auth::user()-&gt;id;
  $test-&gt;save();
  </code></pre>
  
  <p>the problem is that it does not fit the correct date in database, it insert :</p>
  
  <pre><code>2007-02-18 09:52:41
  </code></pre>