mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-10 01:55:38 +00:00
applied immi's TZ patch http://forum.fhem.de/index.php/topic,26034.msg194038.html#msg194038
git-svn-id: https://svn.fhem.de/fhem/trunk@6491 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c4a7f6755d
commit
b579a2f7f5
@ -67,7 +67,16 @@ sub addproperty {
|
||||
my ($self,$line)= @_;
|
||||
# TRIGGER;VALUE=DATE-TIME:20120531T150000Z
|
||||
#main::Debug "line= $line";
|
||||
my ($property,$parameter)= split(":", $line,2); # TRIGGER;VALUE=DATE-TIME 20120531T150000Z
|
||||
my ($property,$property1,$parameter);
|
||||
####### takes care of TZID, which has ":" in the property DTEND;TZID="(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna":20140904T180000
|
||||
if ($line =~ m/TZID=/){
|
||||
($property,$property1,$parameter)= split(":", $line,3);
|
||||
$property .=$property1;
|
||||
}
|
||||
else {
|
||||
($property,$parameter)= split(":", $line,2);
|
||||
}
|
||||
######
|
||||
#main::Debug "property= $property parameter= $parameter";
|
||||
my ($key,$parts)= split(";", $property,2);
|
||||
#main::Debug "key= $key parts= $parts";
|
||||
@ -109,6 +118,15 @@ sub parseSub {
|
||||
#main::Debug "$ln: $line";
|
||||
$ln++;
|
||||
next if($line eq ""); # remove empty line
|
||||
#### corrects line-wraps: if next line is starting with at least 2 spaces, join them
|
||||
if ($ln<$#ical){
|
||||
my $line1= $ical[$ln];
|
||||
if ($line1 =~ s/^\s\s*//) {
|
||||
$line.=$line1;
|
||||
$ln++;
|
||||
};
|
||||
};
|
||||
####
|
||||
last if($line =~ m/^END:.*$/);
|
||||
if($line =~ m/^BEGIN:(.*)$/) {
|
||||
my $entry= ICal::Entry->new($1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user