rescue undefined timezone

pull/133/head
Alex Turchyn 2 years ago
parent ef8c3cfe7f
commit f8712a9da9

@ -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

Loading…
Cancel
Save