Skip to content

Commit 4662046

Browse files
author
Till Brehm
committed
Merge branch '6400-php8-dateformat' into 'develop'
Match conversion from strftime to date got php 8 See merge request ispconfig/ispconfig3!1652
2 parents d6791b3 + c441d88 commit 4662046

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/lib/classes/cron.inc.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function getNextRun($vDate) {
204204
if($this->_bParsed == false) $this->_calcValidValues();
205205

206206
// get the field values for the given Date.
207-
list($iMinute, $iHour, $iDay, $iWDay, $iMonth, $iYear) = explode(':', ISPConfigDateTime::to_string($vDate, 'custom:%M:%H:%d:%w:%m:%Y'));
207+
list($iMinute, $iHour, $iDay, $iWDay, $iMonth, $iYear) = explode(':', ISPConfigDateTime::to_string($vDate, 'custom:i:G:j:w:n:Y'));
208208

209209
$bValid = false;
210210
$iStartYear = $iYear;
@@ -244,7 +244,6 @@ public function getNextRun($vDate) {
244244
}
245245

246246
$ts = mktime($iHour, $iMinute, 0, $iMonth, $iDay, $iYear);
247-
//print strftime('%d.%m.%Y (%A) %H:%M', $ts) . "\n";
248247
//var_dump($iCurMinute, $iCurHour, $iCurDay, $iCurMonth, $iCurWDay, '--', $iNextMinute, $iNextHour, $iNextDay, $iNextMonth, $iNextWDay);
249248
if(ISPConfigDateTime::last_day($iMonth, $iYear) >= $iDay && in_array($app->functions->intval(date('w', $ts)), $this->_aValidValues['weekday'], true) === true) {
250249
$bValid = true;

0 commit comments

Comments
 (0)