title: DateTime Object Not Converting or Displaying Dates
body: <p>I have read a few articles on here regarding this and everything is pointing to the fact that this should work. Unless I am missing something simple and just keep over reading it - I can't get this to work. Been editing each bit and re-running for over 2 hours now and really cant see what I'm doing wrong.</p>
  
  <pre><code>    $strStart = date("d-m-Y H:i:s");
      $strEnd   = $date_due . " " . $eta; 
  
      echo $strStart . "&lt;br/&gt;";
      echo $strEnd . "&lt;br/&gt;";
  
      $dteStart = new DateTime($strStart);
      $dteEnd = new DateTime($strEnd); 
  
      echo "&lt;br/&gt;";
      echo $dteStart; //nothing printed out
      echo $dteEnd; //nothing printed out
      $dteDiff  = $dteStart-&gt;diff($dteEnd); 
  
      echo "&lt;br/&gt;";
      echo $dteDiff-&gt;format("%H:%I:%S"); 
  
      if ($dteStart &gt; $dteEnd) {
      echo "&lt;br/&gt; place past marker on line....";
      }
  </code></pre>
  
  <p>The code prints out </p>
  
  <p>14-07-2017 19:00:01</p>
  
  <p>14-07-2017 20:57:00</p>
  
  <p>so I know </p>
  
  <pre><code>echo $strStart . "&lt;br/&gt;";
  echo $strEnd . "&lt;br/&gt;";
  </code></pre>
  
  <p>is running but after converting those strings to DateTime objects the following lines do not print anything</p>
  
  <pre><code>echo $dteStart; //nothing printed out
  echo $dteEnd; //nothing printed out
  </code></pre>
  
  <p>$date_due and $eta come from a POST and are correctly formatted. 
  Checked my PHP version and I am on 5.6 so above the 5.2 needed for DateTime() to be installed. Any help would be fantastic! Thanks. </p>
  
  <p>With this I need to work out if the date and time are past so the date could be the same but the time will be what is the final decider. I have tried what is in 'PHP Check if date is past to a certain date given in a certain format' but that did not solve my issue. </p>