Much simpler:
<pre>
>>> from dateutil.parser import parse
>>> parse('2012-05-30 04:07:03+00:00')
datetime.datetime(2012, 5, 30, 4, 7, 3, tzinfo=tzutc())
>>> parse('2012-05-30 04:07:03+06:30')
datetime.datetime(2012, 5, 30, 4, 7, 3, tzinfo=tzoffset(None, 23400))
</pre>