Skip to content

Commit

Permalink
fixing Horde_Date_Exception: DateTimeZone::__construct(): Unknown or …
Browse files Browse the repository at this point in the history
…bad timezone (Z)
  • Loading branch information
ralfbecker committed Jun 26, 2015
1 parent 38c366c commit 1ab359a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
34 changes: 17 additions & 17 deletions framework/Icalendar/test/Horde/Icalendar/ExportTest.php
Expand Up @@ -224,24 +224,24 @@ public function testTimezone()

public function testDuration0()
{
$ical = new Horde_Icalendar;
$vevent = Horde_Icalendar::newComponent('VEVENT', $ical);
$vevent->setAttribute('SUMMARY', 'Testevent');
$vevent->setAttribute('UID', 'XXX');
$vevent->setAttribute('DTSTART', new DateTime('20150701T120000Z'));
$vevent->setAttribute('DTSTAMP', new DateTime('20150701T120000Z'));
$vevent->setAttribute('DURATION', 0);
$ical->addComponent($vevent);
$valarm = Horde_Icalendar::newComponent('VALARM', $vevent);
$valarm->setAttribute('TRIGGER', 0, array(
'VALUE' => 'DURATION',
'RELATED' => 'START',
));
$valarm->setAttribute('DESCRIPTION', 'Alarm at event-start');
$vevent->addComponent($valarm);
$this->assertStringEqualsFile(
$ical = new Horde_Icalendar;
$vevent = Horde_Icalendar::newComponent('VEVENT', $ical);
$vevent->setAttribute('SUMMARY', 'Testevent');
$vevent->setAttribute('UID', 'XXX');
$vevent->setAttribute('DTSTART', array('year' => 2015, 'month' => 7, 'mday' => 1), array('VALUE' => 'DATE'));
$vevent->setAttribute('DTSTAMP', array('year' => 2015, 'month' => 7, 'mday' => 1), array('VALUE' => 'DATE'));
$vevent->setAttribute('DURATION', 0);
$ical->addComponent($vevent);
$valarm = Horde_Icalendar::newComponent('VALARM', $vevent);
$valarm->setAttribute('TRIGGER', 0, array(
'VALUE' => 'DURATION',
'RELATED' => 'START',
));
$valarm->setAttribute('DESCRIPTION', 'Alarm at event-start');
$vevent->addComponent($valarm);
$this->assertStringEqualsFile(
__DIR__ . '/fixtures/duration0.ics',
$ical->exportVCalendar()
);
}
}
}
Expand Up @@ -4,8 +4,8 @@ PRODID:-//The Horde Project//Horde iCalendar Library//EN
BEGIN:VEVENT
SUMMARY:Testevent
UID:XXX
DTSTART:20150701T120000Z
DTSTAMP:20150701T120000Z
DTSTART;VALUE=DATE:20150701
DTSTAMP;VALUE=DATE:20150701
DURATION:PT0S
BEGIN:VALARM
TRIGGER;VALUE=DURATION;RELATED=START:PT0S
Expand Down

0 comments on commit 1ab359a

Please sign in to comment.