2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

at: fix alignTime bug (forum#21792)

git-svn-id: https://svn.fhem.de/fhem/trunk@5319 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2014-03-25 10:11:47 +00:00
parent d6a2393e9d
commit ece2d05c69

View File

@ -170,7 +170,8 @@ at_Attr(@)
return "startTimes: $name is not relative" if(!$rel);
my (undef, $hr, $min, $sec, undef) = GetTimeSpec($tspec);
my $alTime = ($alHr*60+$alMin)*60+$alSec;
my $now = time();
my $alTime = ($alHr*60+$alMin)*60+$alSec-fhemTzOffset($now);
my $step = ($hr*60+$min)*60+$sec;
my $ttime = int($hash->{TRIGGERTIME});
my $off = ($ttime % 86400) - 86400;
@ -178,7 +179,7 @@ at_Attr(@)
$off += $step;
}
$ttime += ($alTime-$off);
$ttime += $step if($ttime < time());
$ttime += $step if($ttime < $now);
RemoveInternalTimer($hash);
InternalTimer($ttime, "at_Exec", $hash, 0);