ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\VObject\EmClientTest Class Reference
+ Inheritance diagram for Sabre\VObject\EmClientTest:
+ Collaboration diagram for Sabre\VObject\EmClientTest:

Public Member Functions

 testParseTz ()
 

Detailed Description

Definition at line 8 of file EmClientTest.php.

Member Function Documentation

◆ testParseTz()

Sabre\VObject\EmClientTest::testParseTz ( )

Definition at line 10 of file EmClientTest.php.

References Sabre\VObject\Reader\read().

10  {
11 
12  $str = 'BEGIN:VCALENDAR
13 X-WR-CALNAME:Blackhawks Schedule 2011-12
14 X-APPLE-CALENDAR-COLOR:#E51717
15 X-WR-TIMEZONE:America/Chicago
16 CALSCALE:GREGORIAN
17 PRODID:-//eM Client/4.0.13961.0
18 VERSION:2.0
19 BEGIN:VTIMEZONE
20 TZID:America/Chicago
21 BEGIN:DAYLIGHT
22 TZOFFSETFROM:-0600
23 RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
24 DTSTART:20070311T020000
25 TZNAME:CDT
26 TZOFFSETTO:-0500
27 END:DAYLIGHT
28 BEGIN:STANDARD
29 TZOFFSETFROM:-0500
30 RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
31 DTSTART:20071104T020000
32 TZNAME:CST
33 TZOFFSETTO:-0600
34 END:STANDARD
35 END:VTIMEZONE
36 BEGIN:VEVENT
37 CREATED:20110624T181236Z
38 UID:be3bbfff-96e8-4c66-9908-ab791a62231d
39 DTEND;TZID="America/Chicago":20111008T223000
40 TRANSP:OPAQUE
41 SUMMARY:Stars @ Blackhawks (Home Opener)
42 DTSTART;TZID="America/Chicago":20111008T193000
43 DTSTAMP:20120330T013232Z
44 SEQUENCE:2
45 X-MICROSOFT-CDO-BUSYSTATUS:BUSY
46 LAST-MODIFIED:20120330T013237Z
47 CLASS:PUBLIC
48 END:VEVENT
49 END:VCALENDAR';
50 
51  $vObject = Reader::read($str);
52  $dt = $vObject->VEVENT->DTSTART->getDateTime();
53  $this->assertEquals(new DateTimeImmutable('2011-10-08 19:30:00', new \DateTimeZone('America/Chicago')), $dt);
54 
55  }
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition: Reader.php:42
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: