From bf13f9fc8a3e0031ab3e50f2b897ed4a49c2eba5 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Thu, 30 Apr 2020 08:41:55 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B02975=20improve=20RotatingLogFileNameBuil?= =?UTF-8?q?der=20next=20cron=20occurrence=20computation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/log.class.inc.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/log.class.inc.php b/core/log.class.inc.php index dfd98dc62..a14ace76f 100644 --- a/core/log.class.inc.php +++ b/core/log.class.inc.php @@ -308,7 +308,7 @@ class DailyRotatingLogFileNameBuilder extends RotatingLogFileNameBuilder public function GetCronProcessNextOccurrence(DateTime $oNow) { $oOccurrence = clone $oNow; - $oOccurrence->modify('tomorrow'); + $oOccurrence->modify('tomorrow midnight'); return $oOccurrence; } @@ -359,8 +359,7 @@ class WeeklyRotatingLogFileNameBuilder extends RotatingLogFileNameBuilder public function GetCronProcessNextOccurrence(DateTime $oNow) { $oOccurrence = clone $oNow; - $oOccurrence->modify('Monday next week'); - $oOccurrence->setTime(0, 0, 0); + $oOccurrence->modify('Monday next week midnight'); return $oOccurrence; } @@ -411,8 +410,7 @@ class MonthlyRotatingLogFileNameBuilder extends RotatingLogFileNameBuilder public function GetCronProcessNextOccurrence(DateTime $oNow) { $oOccurrence = clone $oNow; - $oOccurrence->modify('first day of next month'); - $oOccurrence->setTime(0, 0, 0); + $oOccurrence->modify('first day of next month midnight'); return $oOccurrence; }