python3 时间格式化

pip install python-dateutil

from dateutil import parser
ctime = parser.parse("06 August 2019 14:39")
ctime = ctime.strftime("%Y-%m-%d %H:%M:%S")
posted @ 2019-08-07 10:54  lr.cool  阅读(...)  评论(...编辑  收藏