title: Python time to age, part 2: timezones
body: <p>Following on from my previous question, <em><a href="https://stackoverflow.com/questions/508727/python-time-to-age">Python time to age</a></em>, I have now come across a problem regarding the timezone, and it turns out that it's not always going to be "+0200". So when strptime tries to parse it as such, it throws up an exception.</p>
  
  <p>I thought about just chopping off the +0200 with [:-6] or whatever, but is there a real way to do this with strptime?</p>
  
  <p>I am using Python 2.5.2 if it matters.</p>
  
  <pre><code>&gt;&gt;&gt; from datetime import datetime
  &gt;&gt;&gt; fmt = "%a, %d %b %Y %H:%M:%S +0200"
  &gt;&gt;&gt; datetime.strptime("Tue, 22 Jul 2008 08:17:41 +0200", fmt)
  datetime.datetime(2008, 7, 22, 8, 17, 41)
  &gt;&gt;&gt; datetime.strptime("Tue, 22 Jul 2008 08:17:41 +0300", fmt)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/lib/python2.5/_strptime.py", line 330, in strptime
      (data_string, format))
  ValueError: time data did not match format:  data=Tue, 22 Jul 2008 08:17:41 +0300  fmt=%a, %d %b %Y %H:%M:%S +0200
  </code></pre>