签到功能初始化
消息计数定时任务入库
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user