From b4228e3f35d5e7db10459d440b0566c120b507b2 Mon Sep 17 00:00:00 2001 From: DLmaster Date: Tue, 28 Jan 2025 19:28:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(core):=20=E8=A1=A5=E5=85=85=E5=85=AC?= =?UTF-8?q?=E5=91=8A=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/ui/setting.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/ui/setting.py b/app/ui/setting.py index 00c11cd..0631c2c 100644 --- a/app/ui/setting.py +++ b/app/ui/setting.py @@ -371,7 +371,10 @@ class Setting(QWidget): else: time_local = datetime.strptime("2000-01-01 00:00", "%Y-%m-%d %H:%M") - if if_show or datetime.strptime(notice["time"], "%Y-%m-%d %H:%M") > time_local: + if if_show or ( + datetime.now() > datetime.strptime(notice["time"], "%Y-%m-%d %H:%M") + and datetime.strptime(notice["time"], "%Y-%m-%d %H:%M") > time_local + ): choice = Dialog("公告", notice["content"], self) choice.cancelButton.hide()