调整当前时间的插入

This commit is contained in:
2024-05-29 14:22:29 +08:00
parent 451b693a54
commit fd56fb91b1
2 changed files with 14 additions and 5 deletions

View File

@@ -0,0 +1,6 @@
from datetime import datetime
# 获取yyyy-MM-dd HH:mm:ss格式的当前时间
def get_default_datetime():
return datetime.now().strftime('%Y-%m-%d %H:%M:%S')