Skip to content

Commit 629ae1f

Browse files
committed
Remove newly created function
1 parent 6852190 commit 629ae1f

File tree

5 files changed

+4
-16
lines changed

5 files changed

+4
-16
lines changed

app/code/Magento/Sales/Block/Adminhtml/Order/AbstractOrder.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,4 @@ public function displayShippingPriceInclTax($order)
156156
}
157157
return $this->displayPrices($baseShipping, $shipping, false, ' ');
158158
}
159-
160-
/**
161-
* Get object created at date
162-
*
163-
* @param string $createdAt
164-
* @return \DateTime
165-
* @throws \Exception
166-
*/
167-
public function getCreatedAtAdminDate($createdAt)
168-
{
169-
return $this->_localeDate->date(new \DateTime($createdAt));
170-
}
171159
}

app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ public function getTimezoneForStore($store)
287287
*/
288288
public function getOrderAdminDate($createdAt)
289289
{
290-
return $this->getCreatedAtAdminDate($createdAt);
290+
return $this->_localeDate->date(new \DateTime($createdAt));
291291
}
292292

293293
/**

app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ $creditMemoStatus = isset($_creditMemo->getStates()[$_creditMemo->getState()])
2020
? $_creditMemo->getStates()[$_creditMemo->getState()]
2121
: null;
2222
$memoAdminDate = $block->formatDate(
23-
$block->getCreatedAtAdminDate($_creditMemo->getCreatedAt()),
23+
$block->formatDate($_creditMemo->getCreatedAt(), \IntlDateFormatter::MEDIUM),
2424
IntlDateFormatter::MEDIUM,
2525
true
2626
);

app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<?php
1919
$invoiceAdminDate = $block->formatDate(
20-
$block->getCreatedAtAdminDate($_invoice->getCreatedAt()),
20+
$block->formatDate($_invoice->getCreatedAt(), \IntlDateFormatter::MEDIUM),
2121
\IntlDateFormatter::MEDIUM,
2222
true
2323
);

app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $order = $shipment->getOrder();
2222

2323
<?php
2424
$shipmentAdminDate = $block->formatDate(
25-
$block->getCreatedAtAdminDate($shipment->getCreatedAt()),
25+
$block->formatDate($shipment->getCreatedAt(), \IntlDateFormatter::MEDIUM),
2626
\IntlDateFormatter::MEDIUM,
2727
true
2828
);

0 commit comments

Comments
 (0)