Parses a DateTime field and returns a unix timestamp. If the
field cannot be parsed then the original text is returned
unmodified.
public _parseDateTime ( $text, $tzid = false ) : TODO | ||
$tzid | TODO | |
return | TODO |
/** * Test that the attendee status gets transferred. */ public function testAttendeeStatusInvitation() { $this->markTestIncomplete('Sends mail'); require_once 'Horde/Icalendar/Vfreebusy.php'; $GLOBALS['KOLAB_FILTER_TESTING'] = new Horde_Icalendar_Vfreebusy(); $GLOBALS['KOLAB_FILTER_TESTING']->setAttribute('DTSTART', Horde_Icalendar::_parseDateTime('20080926T000000Z')); $GLOBALS['KOLAB_FILTER_TESTING']->setAttribute('DTEND', Horde_Icalendar::_parseDateTime('20081126T000000Z')); $params = array('unmodified_content' => true, 'incoming' => true); $this->sendFixture(__DIR__ . '/fixtures/attendee_status_invitation.eml', __DIR__ . '/fixtures/null.ret', '', '', '*****@*****.**', '*****@*****.**', 'home.example.org', $params); $result = $this->auth->authenticate('wrobel', array('password' => 'none')); $this->assertNoError($result); $folder = $this->storage->getFolder('INBOX/Kalender'); $data = $folder->getData(); $events = $data->getObjects(); $summaries = array(); foreach ($events as $event) { foreach ($event['attendee'] as $attendee) { switch ($attendee['smtp-address']) { case '*****@*****.**': $this->assertEquals('none', $attendee['status']); break; case '*****@*****.**': $this->assertEquals('accepted', $attendee['status']); break; case '*****@*****.**': $this->assertEquals('declined', $attendee['status']); break; case '*****@*****.**': $this->assertEquals('tentative', $attendee['status']); break; case '*****@*****.**': $this->assertEquals('none', $attendee['status']); break; default: $this->fail('Unexpected attendee!'); break; } } } $result = $data->deleteAll(); $this->assertNoError($result); }