import timetime.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) 转载于:https://www.cnblogs.com/gunduzi/p/10605896.html