title: RFC 3339 how make a dateTime from
body: <p>I'm trying to format a date passed from a google plus Api thats like the guide says in RFC 3339 format:</p>
  
  <blockquote>
    <p>PUBLISHED->   datetime->  The time at which this activity was initially published. Formatted as an RFC 3339 timestamp.</p>
  </blockquote>
  
  <p>So by php documentation i found that:</p>
  
  <blockquote>
    <p>DATE_RFC3339
    Same as DATE_ATOM (since PHP 5.1.3)</p>
  </blockquote>
  
  <p>And that both format are something like:</p>
  
  <blockquote>
    <p>"Y-m-d\TH:i:sP"</p>
  </blockquote>
  
  <p>Actually the output of the Google api is something like:</p>
  
  <blockquote>
    <p>2014-01-22T10:36:00.222Z</p>
  </blockquote>
  
  <p>When I'm trying to launch command like:</p>
  
  <pre><code>$date = DateTime::createFromFormat("Y-m-d\TH:i:sP", $activity['published']); //$activity['published'] contain the  date
  </code></pre>
  
  <p>I have always <code>FALSE</code> as return.
  In my opinion the problem is in the final part </p>
  
  <blockquote>
    <p>.222Z </p>
  </blockquote>
  
  <p>any suggestion will be appreciate before cutting it by some rudimental approach...</p>