修复获取当前月份不能正常执行的问题

This commit is contained in:
zayac 2024-03-01 12:12:55 +08:00
parent cf607d071f
commit bd15885e72

View File

@ -7,8 +7,8 @@ from dateutil.relativedelta import relativedelta
def get_curr_month():
now = datetime.now()
if now.time() < time(13, 0):
now -= timedelta(days=1)
# if now.time() < time(13, 0):
# now -= timedelta(days=1)
return now.strftime("%Y-%m")