title: Python datetime strptime() and strftime(): how to preserve the timezone information
body: <p>See the following code: </p>
  
  <pre><code>import datetime
  import pytz
  
  fmt = '%Y-%m-%d %H:%M:%S %Z'
  
  d = datetime.datetime.now(pytz.timezone("America/New_York"))
  d_string = d.strftime(fmt)
  d2 = datetime.datetime.strptime(d_string, fmt)
  print d_string 
  print d2.strftime(fmt)
  </code></pre>
  
  <p>the output is </p>
  
  <pre><code>2013-02-07 17:42:31 EST
  2013-02-07 17:42:31 
  </code></pre>
  
  <p>The timezone information simply got lost in the translation. </p>
  
  <p>If I switch '%Z' to '%z', I get</p>
  
  <pre><code>ValueError: 'z' is a bad directive in format '%Y-%m-%d %H:%M:%S %z'
  </code></pre>
  
  <p>I know I can use <code>python-dateutil</code>, but I just found it bizzare that I can't achieve this simple feature in datetime and have to introduce more dependency? </p>