Time.now => Time.zone.now

This commit is contained in:
simon lehericey 2018-10-25 15:11:12 +02:00
parent 13ffa61435
commit 2238e5bd9f
21 changed files with 55 additions and 55 deletions

View file

@ -13,7 +13,7 @@ class AntiVirusJob < ApplicationJob
else
status = VirusScan.statuses.fetch(:infected)
end
virus_scan.update(scanned_at: Time.now, status: status)
virus_scan.update(scanned_at: Time.zone.now, status: status)
end
end
end

View file

@ -1,10 +1,10 @@
class ApplicationJob < ActiveJob::Base
before_perform do |job|
Rails.logger.info("#{job.class.name} started at #{Time.now}")
Rails.logger.info("#{job.class.name} started at #{Time.zone.now}")
end
after_perform do |job|
Rails.logger.info("#{job.class.name} ended at #{Time.now}")
Rails.logger.info("#{job.class.name} ended at #{Time.zone.now}")
end
def error(job, exception)