<p>我收到了以下格式的日期时间</p>
<pre><code>timestamp = '2019-03-18 01:50:00 -0800'
</code></pre>
<p>想在python中转换成datetime
我尝试过,但无法选择UTC偏移量</p>
^{pr2}$
<p>我得到的错误</p>
<pre><code>Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/_strptime.py", line 324, in _strptime
(bad_directive, format))
ValueError: 'z' is a bad directive in format '%Y-%m-%d %H:%M:%S %z'
</code></pre>
<p>如何在python2.7中选择UTC偏移量?在</p>