ADD paginate for builds api

This commit is contained in:
Jasder
2020-08-25 15:43:30 +08:00
parent 4932eae285
commit 1ea9e420be
8 changed files with 60 additions and 5 deletions

View File

@@ -1,10 +1,12 @@
module Ci::BuildsHelper
def format_utc_time(unix_time)
Rails.logger.info "00000000000000 #{unix_time}"
return nil if unix_time.blank?
DateTime.strptime(unix_time.to_s,'%s').strftime("%Y-%m-%d %H:%M")
end
def render_duartion_time(end_time, start_time)
(end_time - start_time) / 10000
return nil if end_time == 0
game_spend_time(end_time - start_time)
end
end