Skip to content

Commit 891bdc7

Browse files
MAGETWO-35044: Cron job for Shipping is broken
1 parent ccae842 commit 891bdc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Shipping/Model/Observer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public function __construct(
3737
public function aggregateSalesReportShipmentData()
3838
{
3939
$this->_localeResolver->emulate(0);
40-
$currentDate = $this->_coreLocale->date();
41-
$date = $currentDate->subHour(25);
40+
$currentDate = new \DateTime();
41+
$date = $currentDate->modify('-25 hours');
4242
$this->_shippingFactory->create()->aggregate($date);
4343
$this->_localeResolver->revert();
4444
return $this;

0 commit comments

Comments
 (0)