我在Python中有一个表示unix时间戳(即"1284101485")的字符串,我想将其转换为可读日期.当我使用时time.strftime,我得到一个TypeError:
>>>import time
>>>print time.strftime("%B %d %Y", "1284101485")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: argument must be 9-item sequence, not str
Run Code Online (Sandbox Code Playgroud)