From f8712a9da98a5052f8a7e4f5b5b9f1b69ef642a3 Mon Sep 17 00:00:00 2001 From: Alex Turchyn Date: Thu, 21 Sep 2023 10:36:21 +0300 Subject: [PATCH] rescue undefined timezone --- lib/accounts.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/accounts.rb b/lib/accounts.rb index 02934197..935f31a1 100644 --- a/lib/accounts.rb +++ b/lib/accounts.rb @@ -68,5 +68,7 @@ module Accounts tzinfo = TZInfo::Timezone.get(ActiveSupport::TimeZone::MAPPING[timezone] || timezone) ::ActiveSupport::TimeZone.all.find { |e| e.tzinfo == tzinfo }&.name || timezone + rescue TZInfo::InvalidTimezoneIdentifier + 'UTC' end end