Module: EasyTimeZone
- Included in:
- Time
- Defined in:
- lib/easy_time_zone.rb
Instance Method Summary collapse
Instance Method Details
#in(city) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/easy_time_zone.rb', line 4 def in(city) time_zone = city_zone[city.downcase.to_sym] fail "Unknown city" if time_zone.nil? operator_offset = zone_offset[time_zone.to_sym] add_or_subtract_time self.utc, operator_offset end |