ruby on rails - 'GMT-05:00) EST' option unexpectedly included in time_zone_select dropdown -


(with rails 3.2.20, ruby 1.9.3)

in website in production '(gmt-05:00) est' option unexpectedly included in time_zone_select dropdown:

img

this timezone not exists in activesupport::timezone::mapping. injected activesupport::timezone.zones_map:

def zones_map     @zones_map ||= begin       new_zones_names = mapping.keys - lazy_zones_map.keys       new_zones       = hash[new_zones_names.map { |place| [place, create(place)] }]        lazy_zones_map.merge(new_zones)     end   end 

on line lazy_zones_map.merge(new_zones) because lazy_zones_map contains "est" zone.

it not happen on development box and not happen in rails production console: activesupport::timezone.send :lazy_zones_map returns {"utc"=>(gmt+00:00) utc}.

but when put in view in production

<%= activesupport::timezone.send :lazy_zones_map %>

i {"utc"=>(gmt+00:00) utc, "est"=>(gmt-05:00) est}. don't understand why happens, idea?

the #lazy_zones_map definition is

def lazy_zones_map   require_tzinfo    @lazy_zones_map ||= hash.new |hash, place|     hash[place] = create(place) if mapping.has_key?(place)   end end 

edit: same version of tzinfo used in production , development, 0.3.44 (i've checked command gem.loaded_specs["tzinfo"]).


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -