adjust templates, add timezone and locale

This commit is contained in:
Alex Turchyn committed 2023-06-30 01:49:48 +03:00
1 parent d0c7d449d5
commit c904d51302
47 files changed
+331 -171

No files matched your search

+11
View File
@@ -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