Closed scottrblock closed 8 months ago
Given a test.ics file with the following VTIMEZONE defined:
test.ics
VTIMEZONE
BEGIN:VTIMEZONE TZID:US/Pacific BEGIN:DAYLIGHT TZOFFSETFROM:-0800 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU DTSTART:20070311T020000 TZNAME:PDT TZOFFSETTO:-0700 END:DAYLIGHT BEGIN:STANDARD TZOFFSETFROM:-0700 RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU DTSTART:20071104T020000 TZNAME:PST TZOFFSETTO:-0800 END:STANDARD END:VTIMEZONE
and a first event such as:
BEGIN:VEVENT SUMMARY:Redacted PRIORITY:5 X-MICROSOFT-CDO-BUSYSTATUS:BUSY X-MICROSOFT-CDO-IMPORTANCE:1 CLASS:PUBLIC TRANSP:OPAQUE UID:redacted DTSTART;TZID=US/Pacific:20180626T120000 SEQUENCE:0 X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY X-MICROSOFT-CDO-APPT-SEQUENCE:0 X-MICROSOFT-CDO-INSTTYPE:0 X-MICROSOFT-DISALLOW-COUNTER:FALSE STATUS:CONFIRMED DTSTAMP:20180918T165239Z CREATED:20180918T165240Z DTEND;TZID=US/Pacific:20180626T123000 X-APPLE-TRAVEL-ADVISORY-BEHAVIOR:AUTOMATIC DESCRIPTION:Redacted END:VEVENT
If I do
file = open('test.ics') cal = Vpim::Icalendar.decode(file).first all_events = cal.events {}.to_a first_event = all_events.first timezone_of_first_event = first_event.properties.find { |f| f.name? 'DTSTART' }.pvalue('TZID')
As indicated by the DAYLIGHT rule in VTIMEZONE in this .ics file, I'd expect timezone_of_first_event to be Pacific Daylight Time, but it is Pacific Standard Time
DAYLIGHT
timezone_of_first_event
Pacific Daylight Time
Pacific Standard Time
VTIMEZONE isn't supported by vPim. It uses system/ruby timezone definitions. Maybe someone will support VTIMEZONE some day.
Given a
test.ics
file with the followingVTIMEZONE
defined:and a first event such as:
If I do
As indicated by the
DAYLIGHT
rule inVTIMEZONE
in this .ics file, I'd expecttimezone_of_first_event
to bePacific Daylight Time
, but it isPacific Standard Time