aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/timezones.rb
blob: ac018eb7527cec4765b6b14ef81009963987665e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

module ActiveJob
  module Timezones #:nodoc:
    extend ActiveSupport::Concern

    included do
      around_perform do |job, block|
        Time.use_zone(job.timezone, &block)
      end
    end
  end
end