From b02454206bc3ef00e24eaa778379a512f2766dd7 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sat, 3 Aug 2019 12:30:38 +0000 Subject: [PATCH] fhem.pl: fix calcAlignTime for the early hours (Forum #102740) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@19943 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fhem.pl b/fhem.pl index edcb4e95f..727932fd3 100755 --- a/fhem.pl +++ b/fhem.pl @@ -5790,10 +5790,10 @@ computeAlignTime($$@) return ("timeSpec: $tmErr", undef) if($alErr); my $now = int(gettimeofday()); - my $alTime = ($alHr*60+$alMin)*60+$alSec-fhemTzOffset($now); + my $alTime = ($alHr*60+$alMin)*60+$alSec; my $step = ($hr*60+$min)*60+$sec; my $ttime = ($triggertime ? int($triggertime) : $now); - my $off = ($ttime % 86400) - 86400; + my $off = (($ttime+fhemTzOffset($now)) % 86400) - 86400; while($off < $alTime) { $off += $step; }