mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
1. 优化更新时间格式化
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user