签到功能初始化

消息计数定时任务入库
This commit is contained in:
liuwei
2025-02-05 14:48:05 +08:00
parent f0a5cfe092
commit cfe495e201
6 changed files with 23 additions and 20 deletions

View File

@@ -24,7 +24,7 @@ def add_task(description, time_str):
conn = sqlite3.connect(DB_FILE)
c = conn.cursor()
time_obj = datetime.datetime.strptime(time_str, '%Y-%m-%d %H:%M:%S')
c.execute("INSERT INTO tasks (description, reminder_time) VALUES (?, ?)",
c.execute("INSERT INTO tasks (des cription, reminder_time) VALUES (?, ?)",
(description, time_obj.isoformat()))
conn.commit()
conn.close()