Skip to content

Commit af7accb

Browse files
authored
Merge pull request #3353 from jeedom/fix/cmd-get-history
fix: expected type object, get string ($now)
2 parents 7194f92 + 5db870e commit af7accb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/ajax/cmd.ajax.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@
385385
}
386386

387387
if ($dateStart == '' && init('dateRange') != 'all') {
388-
$now = date('Y-m-d');
389-
$dateStart = $now->modify('- ' . init('dateRange'));
388+
$now = new DateTime();
389+
$dateStart = $now->modify('- ' . init('dateRange'))->format('Y-m-d');
390390
}
391391

392392
$return['maxValue'] = '';

0 commit comments

Comments
 (0)