diff options
Diffstat (limited to 'activejob/lib/active_job/timezones.rb')
-rw-r--r-- | activejob/lib/active_job/timezones.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/activejob/lib/active_job/timezones.rb b/activejob/lib/active_job/timezones.rb new file mode 100644 index 0000000000..83f459aea5 --- /dev/null +++ b/activejob/lib/active_job/timezones.rb @@ -0,0 +1,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 |