title: Python timezone '%z' directive for datetime.strptime() not available
body: <h2>Using '%z' pattern of datetime.strptime()</h2>
  
  <p>I have a string text that represent a date and I'm perfectly able to parse it and transform it into a clean datetime object:</p>
  
  <pre><code>date = "[24/Aug/2014:17:57:26"
  dt = datetime.strptime(date, "[%d/%b/%Y:%H:%M:%S")  
  </code></pre>
  
  <p>Except that I can't catch the entire date string with <strong>the timezone</strong> using the <em>%z pattern</em> as specified <a href="http://docs.python.org/2/library/datetime.html#datetime.tzinfo" rel="noreferrer">here</a></p>
  
  <pre><code>date_tz = 24/Aug/2014:17:57:26 +0200
  dt = datetime.strptime(date, "[%d/%b/%Y:%H:%M:%S %z]")
  &gt;&gt;&gt; ValueError: 'z' is a bad directive in format '[%d/%b/%Y:%H:%M:%S %z]'
  </code></pre>
  
  <p>Because as <a href="http://bugs.python.org/issue6641" rel="noreferrer">this bug report</a> says </p>
  
  <blockquote>
    <p>strftime() is implemented <strong>per platform</strong></p>
  </blockquote>
  
  <p>I precise that there is no such a problem with the naive tzinfo directive '%Z'</p>
  
  <h2>Workaround : Casting tzinfo string into tzinfo object</h2>
  
  <p>I can perfectly make the following workaround by transforming the GST time format string into a tzinfo object [as suggested here][4] using <a href="http://labix.org/python-dateutil" rel="noreferrer">dateutil</a> module
  and then insert <a href="https://stackoverflow.com/questions/6818377/insert-a-tzinfo-into-datetime">tzinfo into datetime object</a></p>
  
  <h2>Question: Make %z available for my plateform?</h2>
  
  <p>But as I will  obviously need %z pattern for further project I would like to find a solution to avoid this workaround and using external module for this simple task.
  Can you suggest me some reading on it? I supposed that newer version of python (I'm on 2.7) can handle it but I'd rather not changing my version now for this little but crucial detail.</p>
  
  <h2>[EDIT]</h2>
  
  <p>Well, seeing comments make me reformulated my question how to parse Email time zone indicator using strptime() without being aware of locale time?</p>