import time time.strftime('%Y-%m-%d',time.localtime(time.time())) 转载于:https://www.cnblogs.com/pxfb/p/7649070.html