修正日期格式不正确的问题

This commit is contained in:
Gitea 2023-08-23 07:44:04 +00:00
parent a550f53769
commit 13f93a04fe
1 changed files with 3 additions and 1 deletions

View File

@ -41,6 +41,8 @@ SELECT date from ai_task_static_history where date>'{begin_date_str}' GROUP BY d
if last_date is None:
last_date_str=(today-timedelta(days=60)).strftime('%Y-%m-%d')
else:
config.logger.info(f"{last_date}")
last_date=datetime.strptime(last_date,"%Y-%m-%d")
last_date_str=last_date.strftime('%Y-%m-%d')
#last_date_str='2023-02-01'
if last_date_str==today_str:
@ -117,4 +119,4 @@ SELECT repo_id,count(repo_id) as open_count from issue where is_closed=false an
if __name__ == '__main__':
# 生成测试数据
record_task_history()
record_task_history()