From 1e705420337e452655fd5eae34cfecb55274badf Mon Sep 17 00:00:00 2001 From: James Jeffers <jdjeffers@protonmail.com> Date: Sat, 11 Jan 2025 16:25:40 -0500 Subject: [PATCH] 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. --- lib/huginn_scheduler.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/huginn_scheduler.rb b/lib/huginn_scheduler.rb index 33e533e548..66870c7038 100644 --- a/lib/huginn_scheduler.rb +++ b/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