From 985f8ab44de3392bd99cec0a289fdae03707b2bc Mon Sep 17 00:00:00 2001 From: liuwei Date: Tue, 10 Jun 2025 15:46:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BC=96=E8=BE=91=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/dashboard/blueprints/message_push.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/admin/dashboard/blueprints/message_push.py b/admin/dashboard/blueprints/message_push.py index 7fbeaeb..0db1004 100644 --- a/admin/dashboard/blueprints/message_push.py +++ b/admin/dashboard/blueprints/message_push.py @@ -201,6 +201,20 @@ def update_task(task_id): data['updated_at'] = date.strftime('%Y-%m-%d %H:%M:%S') except ValueError: pass + + if 'schedule_time' in data: + try: + date = datetime.strptime(data['schedule_time'], '%a, %d %b %Y %H:%M:%S GMT') + data['schedule_time'] = date.strftime('%Y-%m-%d %H:%M:%S') + except ValueError: + pass + + if 'recurring_end' in data and data['recurring_end']: + try: + date = datetime.strptime(data['recurring_end'], '%a, %d %b %Y %H:%M:%S GMT') + data['recurring_end'] = date.strftime('%Y-%m-%d %H:%M:%S') + except ValueError: + pass # 更新任务 db.update_task(task_id, data)