Bläddra i källkod

Fixes issue where a timezone is indicated in Rails TimeZone format, but the identifier is missing form the ActiveSupport::TimeZone::MAPPING. Instead, the timezone is set and the tzinfo is derived from the current tzinfo-data, etc. and the rufus-sheduler friendly tzinfo identifier is used.

James Jeffers 2 månader sedan
förälder
incheckning
1e70542033
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      lib/huginn_scheduler.rb

+ 2 - 1
lib/huginn_scheduler.rb

@@ -112,7 +112,8 @@ class HuginnScheduler < LongRunnable::Worker
   }
 
   def setup
-    tzinfo_friendly_timezone = ActiveSupport::TimeZone::MAPPING[ENV['TIMEZONE'].presence || "Pacific Time (US & Canada)"]
+    Time.zone = ENV['TIMEZONE'].presence || 'Pacific Time (US & Canada)'
+    tzinfo_friendly_timezone = Time.zone.tzinfo.identifier
 
     # Schedule event propagation.
     every '1m' do