pull/220/head
Christian Geier 2017-03-23 00:23:01 +01:00
rodzic 8a52e56fab
commit 0368e16faa
2 zmienionych plików z 37 dodań i 0 usunięć

Wyświetl plik

@ -318,3 +318,13 @@ class TestTimezoneCreation(unittest.TestCase):
),
tz._tzinfos.keys()
)
def test_same_start_date(self):
"""testing if we can handle VTIMEZONEs whose different components
have the same start DTIMEs."""
directory = os.path.dirname(__file__)
with open(os.path.join(directory, 'timezone_same_start.ics'), 'rb') as fp:
data = fp.read()
cal = icalendar.Calendar.from_ical(data)
d = cal.subcomponents[1]['DTSTART'].dt
self.assertEqual(d.strftime('%c'), 'Fri Feb 24 12:00:00 2017')

Wyświetl plik

@ -0,0 +1,27 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:Microsoft Exchange Server 2010
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:Pacific Standard Time
BEGIN:STANDARD
DTSTART:16010101T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
SUMMARY;LANGUAGE=en-US:Test 4
DTSTART;TZID="Pacific Standard Time":20170224T120000
DTEND;TZID="Pacific Standard Time":20170224T123000
DTSTAMP:20170224T180431Z
UID:040000008200E00074C5B7101A82E0080000000090E19664858ED20100000000000000
END:VEVENT
END:VCALENDAR