title: 3 digits for milliseconds in DateTime
body: <p>I created a function and it returns a date looks like:
  2016-07-15T10:10:52.<strong><em>031563</em></strong>+00:00</p>
  
  <p>It's fine but the problem is digits for milliseconds. How to remove the 3 last digits? I only need 3 ones.</p>
  
  <pre><code>private function getFormattedDate($time = 'now'){
      $t = microtime(true);
      $micro = sprintf("%06d",($t - floor($t)) * 1000000);
      $d = new DateTime( date('Y-m-d H:i:s.'.$micro, $t) );
      $d-&gt;modify($time);
  
      return $d-&gt;format('Y-m-d\Th:i:s.uP'); // note at point on "u"
    }
  </code></pre>