日付時刻を指定した文字列形式に変換

strftimeを使う。

>>> from time import *
>>> strftime("%Y-%m-%d %H:%M:%S", localtime())
'2007-06-23 10:13:25'
>>>