I am looking for the code that displays list of countries/regions in ruby on rails when selecting a specific country/region, it displays the time zone of it. For example when i choose “United Kingdom" as country/region then it should displays “(GMT +00:00)London" as Time Zone. My application runs on Rails 3.2.11. I am displaying all the countries using countries gem and all the time zones using ActiveSupport::TimeZone. I want to know if Ruby on Rails provide this functionality by default or if there is any other possible way to achieve this.
In Rails 5.2 this is simple: ActiveSupport::TimeZone.country_zones("US")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With