From 41f876a7145ea507fd6b56c6cc71b70bef48a536 Mon Sep 17 00:00:00 2001 From: Jasder <2053003901@@qq.com> Date: Tue, 25 Aug 2020 15:48:41 +0800 Subject: [PATCH] FIX build finished time bug --- app/helpers/ci/builds_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/ci/builds_helper.rb b/app/helpers/ci/builds_helper.rb index 02707bec3..099b3a2cb 100644 --- a/app/helpers/ci/builds_helper.rb +++ b/app/helpers/ci/builds_helper.rb @@ -1,7 +1,7 @@ module Ci::BuildsHelper def format_utc_time(unix_time) Rails.logger.info "00000000000000 #{unix_time}" - return nil if unix_time.blank? + return nil if unix_time == 0 DateTime.strptime(unix_time.to_s,'%s').strftime("%Y-%m-%d %H:%M") end