diff --git a/src/Services/Cron.php b/src/Services/Cron.php index 77431bac..0e874a84 100755 --- a/src/Services/Cron.php +++ b/src/Services/Cron.php @@ -657,12 +657,18 @@ final class Cron $targetDate = new DateTime($oZhuanfasRow->end_date); $interval = $today->diff($targetDate); + if ($today > $targetDate) { + $iDiffDay = -$interval->days; + } else { + $iDiffDay = $interval->days; + } + $oTgSendFormat->rowAdd( $oZhuanfasRow->name, $oZhuanfasRow->today_width, $oZhuanfasRow->use_width, $oZhuanfasRow->max_width, - $interval->days + $iDiffDay ); }