当使用Python strftime时,是否有一种方法可以删除日期的第一个0,如果它在10号之前,即。01 = 1?找不到一个%的东西吗?

谢谢!

我有一个字符串表示unix时间戳(即。"1284101485"),我想把它转换成一个可读的日期。当我利用时间的时候。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

我尝试在我的bash shell脚本中使用$(date),但是,我想要YYYY-MM-DD格式的日期。 我怎么得到这个?