class Timezonify::TimezoneHelper

Public Class Methods

find_all_timezones_with_offset(offset_in_hours) click to toggle source
# File lib/timezonify.rb, line 97
def self.find_all_timezones_with_offset(offset_in_hours)
  offset_in_seconds = offset_in_hours * 3600
  ActiveSupport::TimeZone.all.select{|tz| tz.utc_offset == offset_in_seconds}
end