From 666fe0b7120150918b561a8efef0493b41508087 Mon Sep 17 00:00:00 2001 From: bergware Date: Fri, 20 Apr 2018 08:17:31 +0200 Subject: [PATCH] Fixed calculation of next custom parity schedule --- plugins/dynamix/include/DashUpdate.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/dynamix/include/DashUpdate.php b/plugins/dynamix/include/DashUpdate.php index 04ff3e4c5..2475776eb 100644 --- a/plugins/dynamix/include/DashUpdate.php +++ b/plugins/dynamix/include/DashUpdate.php @@ -123,24 +123,24 @@ function stage($i) { } } else { $d = $i ? ($now ? $D : today($i)) : today(last_day()-6); - $i = $i ?: last_day()-6; - $D = mkdate($d, $i); + $x = $i ?: last_day()-6; + $D = mkdate($d, $x); $t = mktime($h,$m,0,$M,$D,$Y)-$time; // first day if ($t < 0) { - $D = mkdate(next_day($d), $i); + $D = mkdate(next_day($d), $x); $t = mktime($h,$m,0,$M,$D,$Y)-$time; // next day } if ($t < 0) { $M = find_month($M+1); - $i = $i ?: last_day()-6; - $D = mkdate(today($i), $i); + $x = $i ?: last_day()-6; + $D = mkdate(today($x), $x); $t = mktime($h,$m,0,$M,$D,$Y)-$time; // next month } if ($t < 0) { $Y++; $M = find_month(1); - $i = $i ?: last_day()-6; - $D = mkdate(today($i), $i); + $x = $i ?: last_day()-6; + $D = mkdate(today($x), $x); $t = mktime($h,$m,0,$M,$D,$Y)-$time; // next year } }