From a6914413f7d35f520c47e4417094b328e340b579 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 30 Apr 2024 18:20:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A6=82=E6=9E=9C=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E4=B8=BA0=E7=82=B9=E5=88=99=E5=8F=96?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4=E6=9D=A5=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=B9=B4=E6=9C=88=E6=97=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/wpm/models.py b/apps/wpm/models.py index bf3ca80a..aa157ae6 100644 --- a/apps/wpm/models.py +++ b/apps/wpm/models.py @@ -38,7 +38,10 @@ class SfLog(CommonADModel): """ 返回值班记录所属年月日 """ - end_time_local = localtime(self.end_time) + end_time = self.end_time + if end_time.minute == 0 and end_time.second == 0 and end_time.hour == 0: # 如果结束时间为00:00:00 + end_time = self.start_time + end_time_local = localtime(end_time) return end_time_local.year, end_time_local.month, end_time_local.day