adjust templates, add timezone and locale

This commit is contained in:
Alex Turchyn
2023-06-30 01:26:13 +03:00
parent d0c7d449d5
commit c904d51302
47 changed files with 331 additions and 171 deletions
+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