time_zone_select produces option tags for almost any time zones in the world but if you want the list of US time zones only, without using the TZInfo library then you should add a file under the lib directory say us.rb and add the following code
class US
def self.all
TimeZone.us_zones
end
end
and in you views use
<%= time_zone_select object, method, nil, :model=>US %>
time_zone_select showing only US time zones
January 4, 2008 · 1 Comment
Categories: rails
Tagged: time_zone_select rails US time_zones
1 response so far ↓
Akhil Bansal // January 4, 2008 at 11:55 am
Wow,
Leave a Comment