mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-03 13:45:36 +00:00
98_DOIFtools.pm: DOIFtoolsNextTimer add indirect weekdays handling
git-svn-id: https://svn.fhem.de/fhem/trunk@15576 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5e34831df8
commit
6e7e6ff449
@ -778,10 +778,14 @@ sub DOIFtoolsNextTimer {
|
||||
my ($timer_str,$tn) = @_;
|
||||
$timer_str =~ /(\d\d).(\d\d).(\d\d\d\d) (\d\d):(\d\d):(\d\d)\|?(.*)/;
|
||||
my $tstr = "$1.$2.$3 $4:$5:$6";
|
||||
return $tstr if (length($7) == 0);
|
||||
return $tstr if (!$7 && length($7) == 0);
|
||||
my $timer = timelocal($6,$5,$4,$1,$2-1,$3);
|
||||
my $weekd = $7;
|
||||
if ($weekd =~ s/\[(.*):(.*)\]//) {
|
||||
$weekd .= ReadingsVal($1,length($2)>0?$2:"state","") if($1);
|
||||
}
|
||||
my $tdays = "";
|
||||
$tdays = $tn ? DOIF_weekdays($defs{$tn},$7) : $7;
|
||||
$tdays = $tn ? DOIF_weekdays($defs{$tn},$weekd) : $weekd;
|
||||
$tdays =~/([0-8])/;
|
||||
return $tstr if (length($1) == 0);
|
||||
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($timer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user