From b212ce8a737fa7fce23489df25dee55620071d84 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Sat, 27 Aug 2022 16:41:00 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BC=98=E5=8C=96=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto_pt/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auto_pt/views.py b/auto_pt/views.py index 7784401..60802fd 100644 --- a/auto_pt/views.py +++ b/auto_pt/views.py @@ -109,7 +109,9 @@ def get_git_logs(master='', n=10): update_notes.append(info) info = {} list1 = string.split(':', 1) - info['date'] = list1[1].strip() + # 格式化时间 + update_time = datetime.strptime(list1[1].strip(), '%a %b %d %X %Y +0800') + info['date'] = update_time.strftime('%Y-%m-%d %H:%M:%S') info['data'] = [] continue info['data'].append(string.strip())