title: Parsing time string in Python
body: <p>I have a date time string that I don't know how to parse it in Python.</p>
  
  <p>The string is like this:</p>
  
  <pre><code>Tue May 08 15:14:45 +0800 2012
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>datetime.strptime("Tue May 08 15:14:45 +0800 2012","%a %b %d %H:%M:%S %z %Y")
  </code></pre>
  
  <p>but Python raises </p>
  
  <pre><code>'z' is a bad directive in format '%a %b %d %H:%M:%S %z %Y'
  </code></pre>
  
  <p>According to Python doc:</p>
  
  <blockquote>
    <p>%z    UTC offset in the form +HHMM or -HHMM (empty string if the the object is naive).</p>
  </blockquote>
  
  <p><strong>What is the right format to parse this time string?</strong></p>