时间类1.获取当前时间2.日期格式化 时间类 1.获取当前时间# 获取当前时间import datetimedatetime.datetime.now 2.日期格式化import timetime.strtime('%Y-%m-%d %H:%M:%S')