Class: Icalendar::Offset::TimeZoneStore
- Inherits:
-
Icalendar::Offset
- Object
- Icalendar::Offset
- Icalendar::Offset::TimeZoneStore
- Defined in:
- lib/icalendar/offset/time_zone_store.rb
Instance Method Summary collapse
Methods inherited from Icalendar::Offset
build, #initialize, #normalized_tzid
Constructor Details
This class inherits a constructor from Icalendar::Offset
Instance Method Details
#normalized_value ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/icalendar/offset/time_zone_store.rb', line 10 def normalized_value # plan b - use definition from provided `VTIMEZONE` offset = tz_info.offset_for_local(value).to_s Icalendar.logger.debug("Plan b - parsing #{value} with offset: #{offset}") if value.respond_to?(:change) value.change offset: offset else ::Time.new value.year, value.month, value.day, value.hour, value.min, value.sec, offset end end |
#valid? ⇒ Boolean
6 7 8 |
# File 'lib/icalendar/offset/time_zone_store.rb', line 6 def valid? timezone_store && tz_info end |