File tree Expand file tree Collapse file tree 6 files changed +9
-7
lines changed
app/code/Magento/SalesGraphQl/Model
dev/tests/api-functional/testsuite/Magento/GraphQl/Sales
lib/internal/Magento/Framework/Stdlib Expand file tree Collapse file tree 6 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public function format(OrderInterface $orderModel): array
4949 'increment_id ' => $ orderModel ->getIncrementId (),
5050 'number ' => $ orderModel ->getIncrementId (),
5151 'order_date ' => $ this ->timezone ->date ($ orderModel ->getCreatedAt ())
52- ->format (DateTime::DATETIME_PHP_FORMAT ),
52+ ->format (DateTime::DATETIME_SLASH_PHP_FORMAT ),
5353 'order_number ' => $ orderModel ->getIncrementId (),
5454 'status ' => $ orderModel ->getStatusLabel (),
5555 'email ' => $ orderModel ->getCustomerEmail (),
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public function resolve(
5353 $ comments [] = [
5454 'message ' => $ comment ->getComment (),
5555 'timestamp ' => $ this ->timezone ->date ($ comment ->getCreatedAt ())
56- ->format (DateTime::DATETIME_PHP_FORMAT )
56+ ->format (DateTime::DATETIME_SLASH_PHP_FORMAT )
5757 ];
5858 }
5959 }
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ private function getInvoiceComments(InvoiceInterface $invoice): array
7474 if ($ comment ->getIsVisibleOnFront ()) {
7575 $ comments [] = [
7676 'timestamp ' => $ this ->timezone ->date ($ comment ->getCreatedAt ())
77- ->format (DateTime::DATETIME_PHP_FORMAT ),
77+ ->format (DateTime::DATETIME_SLASH_PHP_FORMAT ),
7878 'message ' => $ comment ->getComment ()
7979 ];
8080 }
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ private function getShipmentComments(ShipmentInterface $shipment): array
7575 if ($ comment ->getIsVisibleOnFront ()) {
7676 $ comments [] = [
7777 'timestamp ' => $ this ->timezone ->date ($ comment ->getCreatedAt ())
78- ->format (DateTime::DATETIME_PHP_FORMAT ),
78+ ->format (DateTime::DATETIME_SLASH_PHP_FORMAT ),
7979 'message ' => $ comment ->getComment ()
8080 ];
8181 }
Original file line number Diff line number Diff line change @@ -509,7 +509,7 @@ public function testGetCustomerDescendingSortedOrders()
509509 for ($ i = 1 ; $ i <= 3 ; $ i ++) {
510510 $ orderNumber = $ this ->fixtures ->get ('or ' . $ i )->getIncrementId ();
511511 $ orderCreatedAt = $ this ->timezone ->date ($ this ->fixtures ->get ('or ' . $ i )->getCreatedAt ())
512- ->format (DateTime::DATETIME_PHP_FORMAT );
512+ ->format (DateTime::DATETIME_SLASH_PHP_FORMAT );
513513 $ orderNumberCreatedAtExpected [$ orderNumber ] = $ orderCreatedAt ;
514514 }
515515
Original file line number Diff line number Diff line change 11<?php
22/**
3- * Copyright © Magento, Inc. All rights reserved.
4- * See COPYING.txt for license details .
3+ * Copyright 2011 Adobe
4+ * All Rights Reserved .
55 */
66namespace Magento \Framework \Stdlib ;
77
@@ -25,6 +25,8 @@ class DateTime
2525
2626 public const DATE_PHP_FORMAT = 'Y-m-d ' ;
2727
28+ public const DATETIME_SLASH_PHP_FORMAT = 'd/m/Y H:i:s ' ;
29+
2830 /**#@-*/
2931
3032 /**
You can’t perform that action at this time.
0 commit comments