python获取当前时间

datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')

原文地址:https://www.cnblogs.com/Baronboy/p/8133982.html