Chris V. Chris V. - 8 months ago 19
Ruby Question

Filter out TZInfo:Timezone Ruby results to exclude

I want to filter out the timezones TZInfo provides so I can exclude the values that are formatted like

(GMT +03:00) Nairobi
which are not compatible with the 95% of the locations there (Europe - Sofia, US - Central etc.).

<%= f.time_zone_select :system_locale, TZInfo::Timezone.all.sort, {}, {:class => 'ui fluid search dropdown'} %>

How can I achieve this ?


You can try this: {|k| !"GMT")}