title: Convert datetime to local python
body: <p>I have been reading quite some time answers and couldn't really drive into results.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>&gt;&gt;&gt;from datetime import datetime
  &gt;&gt;&gt;a = '2013-08-23T23:37:38+0000'
  &gt;&gt;&gt;dt = datetime.strptime(a,'%Y-%m-%dT%H:%M:%S+0000')
  &gt;&gt;&gt;print   dt.date()
  2013-08-23
  &gt;&gt;&gt;print   dt.time()
  23:37:38
  </code></pre>
  
  <p>What is the simplest way to output this result (assuming of course that <code>a</code> is unknown) given that we live in Central Europe. So it should be "daylight saving-proof" as well.</p>
  
  <p>In winter:</p>
  
  <pre><code>2013-08-24
  00:37:38
  </code></pre>
  
  <p>In summer:</p>
  
  <pre><code>2013-08-24
  01:37:38
  </code></pre>
  
  <p>If it only needs default libraries it would be great.</p>
  
  <hr>
  
  <p><strong>Some more info</strong></p>
  
  <p>I dived into the libraries after my question. My above 3rd line should be better be:
  <code>dt = datetime.strptime(a,'%Y-%m-%dT%H:%M:%S%z')</code>. However a bug came out in 2.7.5 python (OS X if it matters) and had some trouble finding the <code>%z</code>. If you have trouble change version, if not ignore this. Of course the <code>strptime()</code> is just simpler level of <code>dateutil.parser</code> mentioned in the two answers so it can better be used instead of my code above.</p>