From a9d1167b1fdae6f5f5496738b3e7d1e05949dcd0 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Thu, 22 Feb 2018 14:14:42 +0000 Subject: Add support for timezones to Active Job Record what was the current timezone in effect when the job was enqueued and then restore when the job is executed in same way that the current locale is recorded and restored. --- activejob/test/support/integration/dummy_app_template.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activejob/test/support/integration/dummy_app_template.rb') diff --git a/activejob/test/support/integration/dummy_app_template.rb b/activejob/test/support/integration/dummy_app_template.rb index 7ea78c3350..b56dd3e591 100644 --- a/activejob/test/support/integration/dummy_app_template.rb +++ b/activejob/test/support/integration/dummy_app_template.rb @@ -21,6 +21,7 @@ class TestJob < ActiveJob::Base File.open(Rails.root.join("tmp/\#{x}.new"), "wb+") do |f| f.write Marshal.dump({ "locale" => I18n.locale.to_s || "en", + "timezone" => Time.zone.try(:name) || "UTC", "executed_at" => Time.now.to_r }) end -- cgit v1.2.3