mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
Clean up timezone selector
This commit is contained in:
parent
a1065fde83
commit
4a768d0358
1 changed files with 6 additions and 1 deletions
|
@ -365,6 +365,11 @@ module LanguagesHelper
|
|||
end
|
||||
|
||||
def timezone_options
|
||||
ActiveSupport::TimeZone.all.map { |tz| [ tz.name + " (#{tz.tzinfo.identifier})", tz.tzinfo.identifier ] }
|
||||
ActiveSupport::TimeZone.all
|
||||
.sort_by { |tz| [ tz.utc_offset, tz.name ] }
|
||||
.map do |tz|
|
||||
name = tz.name.split(" - ").first.gsub(" (US & Canada)", "")
|
||||
[ "(#{tz.formatted_offset}) #{name}", tz.tzinfo.identifier ]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue