title: Parsing The Twitter API created_at
body: <p>I want to parse the Twitter API <code>created_at</code> value(stored into a variable), which looks like this:</p>
  
  <blockquote>
    <p>Sun Aug 28 19:31:16 +0000 2011</p>
  </blockquote>
  
  <p>Into this:</p>
  
  <blockquote>
    <p>19:31, Aug 28</p>
  </blockquote>
  
  <p>But I need it to be timezone-aware. Any ideas about how to make this using <code>php</code>?</p>
  
  <hr>
  
  <p>After using the second option which <a href="https://stackoverflow.com/users/331137/john-flatness">John Flatness</a> suggested I'm getting this error:</p>
  
  <pre><code>Fatal error:  Uncaught exception 'Exception' with message 'DateTime::__construct() [&lt;a href='datetime.--construct'&gt;datetime.--construct&lt;/a&gt;]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Sao_Paulo' for 'BRT/-3.0/no DST' instead' in /misc.php:4
  Stack trace:
  #0 /misc.php(4): DateTime-&gt;__construct('Sun Aug 28 19:3...')
  #1 /tabs/home.php(29): format_date(Object(SimpleXMLElement), 'America/Sao_Pau...')
  #2 {main}
    thrown in /misc.php on line 4
  </code></pre>