Skip to content

Commit

Permalink
Use server time zone when displaying last run
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanovv committed Mar 27, 2020
1 parent 5f9bcf5 commit 2a0b39d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/clockwork_web/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def index

@last_runs = ClockworkWeb.last_runs
@disabled = ClockworkWeb.disabled_jobs
@last_heartbeat = ClockworkWeb.last_heartbeat
@last_heartbeat = ClockworkWeb.last_heartbeat.in_time_zone
end

def job
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/clockwork_web/home_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def friendly_period(period)

def last_run(time)
if time
time_ago_in_words(time)
time_ago_in_words(time.in_time_zone)
end
end

Expand Down

0 comments on commit 2a0b39d

Please sign in to comment.