class Tilia::VObject::Component::VTimeZone
The VTimeZone
component.
This component adds functionality to a component, specific for VTIMEZONE components.
Public Instance Methods
time_zone()
click to toggle source
Returns the PHP DateTimeZone for this VTIMEZONE component.
If we can't accurately determine the timezone, this method will return UTC.
@return [ActiveSupport::TimeZone]
# File lib/tilia/v_object/component/v_time_zone.rb, line 15 def time_zone Tilia::VObject::TimeZoneUtil.time_zone(self['TZID'].to_s, @root) end
validation_rules()
click to toggle source
(see Component#validation_rules
)
# File lib/tilia/v_object/component/v_time_zone.rb, line 20 def validation_rules { 'TZID' => 1, 'LAST-MODIFIED' => '?', 'TZURL' => '?', # At least 1 STANDARD or DAYLIGHT must appear, or more. But both # cannot appear in the same VTIMEZONE. # # The validator is not specific yet to pick this up, so these # rules are too loose. 'STANDARD' => '*', 'DAYLIGHT' => '*' } end