adjust templates, add timezone and locale
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Accounts
|
||||
module_function
|
||||
|
||||
def normalize_timezone(timezone)
|
||||
tzinfo = TZInfo::Timezone.get(ActiveSupport::TimeZone::MAPPING[timezone] || timezone)
|
||||
|
||||
::ActiveSupport::TimeZone.all.find { |e| e.tzinfo == tzinfo }&.name || timezone
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user