Skip to content

Commit 41a43c1

Browse files
author
Carlos Lizaga
committed
Remove deprecated gmDate function from _saveProducts() and _saveStockItem()
functions. Used Intl library for datetime handling: http://php.net/manual/en/book.intl.php
1 parent 8f1aa87 commit 41a43c1

File tree

1 file changed

+2
-2
lines changed
  • app/code/Magento/CatalogImportExport/Model/Import

1 file changed

+2
-2
lines changed

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,7 +1815,7 @@ protected function _saveProducts()
18151815
) {
18161816
$attrValue = $this->dateTime->formatDate($attrValue, false);
18171817
} elseif ('datetime' == $attribute->getBackendType() && strtotime($attrValue)) {
1818-
$attrValue = $this->dateTime->gmDate(
1818+
$attrValue = gmdate(
18191819
'Y-m-d H:i:s',
18201820
$this->_localeDate->date($attrValue)->getTimestamp()
18211821
);
@@ -2240,7 +2240,7 @@ protected function _saveStockItem()
22402240
$stockItemDo->setData($row);
22412241
$row['is_in_stock'] = $this->stockStateProvider->verifyStock($stockItemDo);
22422242
if ($this->stockStateProvider->verifyNotification($stockItemDo)) {
2243-
$row['low_stock_date'] = $this->dateTime->gmDate(
2243+
$row['low_stock_date'] = gmdate(
22442244
'Y-m-d H:i:s',
22452245
(new \DateTime())->getTimestamp()
22462246
);

0 commit comments

Comments
 (0)