From 0efce1d35ed7a3a6f6c32d7fbf1ae512a2bad567 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Tue, 25 Mar 2014 10:11:47 +0000 Subject: [PATCH] at: fix alignTime bug (forum#21792) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@5319 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/90_at.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/FHEM/90_at.pm b/FHEM/90_at.pm index 9c8f5f09b..d1b6b00ab 100755 --- a/FHEM/90_at.pm +++ b/FHEM/90_at.pm @@ -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);