From 0fa0cc492e8d34ee9ad6170333dc47528932e2ab Mon Sep 17 00:00:00 2001 From: xxq250 Date: Mon, 17 Apr 2023 13:59:09 +0800 Subject: [PATCH] =?UTF-8?q?rake=20commit=5Flog=5Fto=5Fdb=20=E6=97=A5?= =?UTF-8?q?=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/commit_log_to_db.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/commit_log_to_db.rake b/lib/tasks/commit_log_to_db.rake index 5cb0003f3..bde59a337 100644 --- a/lib/tasks/commit_log_to_db.rake +++ b/lib/tasks/commit_log_to_db.rake @@ -62,7 +62,7 @@ namespace :commit_log_to_db do commit_message = commit['commit']['message'] user = User.find_by(mail: commiter['email']) commit_date = Time.parse(commit['commit']['author']['date']) - commit_date_str = commit_date.strftime("%a %b %d %H:%M:%S") + commit_date_str = commit_date.strftime("%Y-%m-%d %H:%M:%S") data += "(#{user&.id},#{project.id},#{project.repository&.id},'#{project.identifier}','#{project.owner.name}/#{project.identifier}','#{commit_sha}','#{ref}','#{commit_message}','#{commit_date_str}','#{commit_date_str}')," end