当前日期/时间:
from datetime import datetime, timedelta now_time = datetime.now() today_date_format = now_time.strftime('%Y-%m-%d 00:00:00') today_time_format = now_time.strftime('%Y-%m-%d')
时间格式转换:
时间运算:(加减8个小时)
2024-03-23 16:19:16
当前日期/时间:
from datetime import datetime, timedelta now_time = datetime.now() today_date_format = now_time.strftime('%Y-%m-%d 00:00:00') today_time_format = now_time.strftime('%Y-%m-%d')
时间格式转换:
时间运算:(加减8个小时)