擅长:python、mysql、java
<p>您应该使用<code>datetime</code>模块,首先使用<code>strptime()</code>剥离您的时间,然后使用<code>strftime()</code>重新构建它:</p>
<pre><code>import datetime
time = "2017-10-16T08:27:16+0000"
stripedTime = datetime.datetime.strptime(time, '%Y-%m-%dT%I:%M:%S%z')
newTime = stripedTime.strftime('%H:%M:%S')
print(newTime)
</code></pre>