Page MenuHomePhorge

Fix handling of alarms with "zero duration" (e.g. PT0S)
Open, NormalPublic

Description

It looks like "zero" duration handling is wrong. Consider this PHP code

$e = new Event;
$va = new vectoralarm;
$a1 = new Alarm("Display alarm");
$a1->setRelativeStart(new Duration(0, 0, 0, 0, true), kolabformat::Start);
$va->push($a1);
$e->setAlarms($va);

$xml = kolabformat::writeEvent($e);

The generated XML will contain <duration>-P</duration> or <duration>P</duration>, while it should be PT0S or PT0M.

Details

Ticket Type
Task

Event Timeline

machniak raised the priority of this task from to 60.
machniak updated the task description. (Show Details)
machniak changed Ticket Type from Task to Task.
machniak subscribed.
machniak claimed this task.

Oops. It looks that "P" is valid. I'll look for the issue in other places.

Hmm... I'm not so sure. According to RFC5545 it is not valid.

vanmeeuwen lowered the priority of this task from 60 to Normal.Mar 28 2019, 8:13 AM