diff --git a/fhem/CHANGED b/fhem/CHANGED index ae7ffdee9..5ac9c05f4 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - change: honor DURATION in 57_Calendar.pm - bugfix: YAMAHA_AVR: don't let FHEM hang anymore, when the receiver is not reachable - change: 55_GDS.pm: use Blocking.pm for retrieval of large files diff --git a/fhem/FHEM/57_Calendar.pm b/fhem/FHEM/57_Calendar.pm index a4f8006c6..0ef6334b0 100644 --- a/fhem/FHEM/57_Calendar.pm +++ b/fhem/FHEM/57_Calendar.pm @@ -330,7 +330,11 @@ sub fromVEvent { $self->{uid}= $vevent->value("UID"); $self->{uid}=~ s/\W//g; # remove all non-alphanumeric characters, this makes life easier for perl specials $self->{start}= tm($vevent->value("DTSTART")); - $self->{end}= tm($vevent->value("DTEND")); + if(defined($vevent->value("DTEND"))) { + $self->{end}= tm($vevent->value("DTEND")); + } elsif(defined($vevent->value("DURATION"))) { + $self->{end}= $self->{start} + d($vevent->value("DURATION")); + } $self->{lastModified}= tm($vevent->value("LAST-MODIFIED")); $self->{summary}= $vevent->value("SUMMARY"); $self->{location}= $vevent->value("LOCATION");