Skip to content

Commit 1d86456

Browse files
committed
MAGETWO-45413: Reports feature Refresh Lifetime Statistics is broken
1 parent f1c07c5 commit 1d86456

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/code/Magento/Reports/Model/ResourceModel/Report/AbstractReport.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,10 @@ public function getStoreTZOffsetQuery(
384384
if (null === $from) {
385385
$selectOldest = $connection->select()->from($table, ["MIN({$column})"]);
386386
$from = $connection->fetchOne($selectOldest);
387+
if (null === $from) {
388+
$date = new \DateTime();
389+
$from = $date->format('Y-m-d H:i:s');
390+
}
387391
}
388392

389393
$periods = $this->_getTZOffsetTransitions(

0 commit comments

Comments
 (0)