From e130584fec6eacaf3f6a16abbad54eaf0f0b08e8 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Wed, 25 Jun 2025 09:38:52 +0300 Subject: [PATCH] fix timezone selector --- app/views/accounts/show.html.erb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/accounts/show.html.erb b/app/views/accounts/show.html.erb index 7f371b9d..658ab7c6 100644 --- a/app/views/accounts/show.html.erb +++ b/app/views/accounts/show.html.erb @@ -14,7 +14,10 @@
<%= ff.label :timezone, t('time_zone'), class: 'label' %> <%= ff.select :timezone, nil, {}, class: 'base-select' do %> - <%= time_zone_options_for_select(current_account.timezone) %> + <% tzinfo = TZInfo::Timezone.get(ActiveSupport::TimeZone::MAPPING[current_account.timezone] || current_account.timezone) %> + <% items = ActiveSupport::TimeZone.all.map { |z| [z.to_s, z.name] } %> + <% items.unshift(tzinfo) unless ActiveSupport::TimeZone.all.find { |e| e.tzinfo == tzinfo } %> + <%= options_for_select(items, current_account.timezone) %> <% end %>