Skip to content

Commit 115d1a0

Browse files
committed
Merge remote-tracking branch 'origin/AC-14431' into spartans_pr_29082025
2 parents 245e51a + fbe5a9e commit 115d1a0

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

app/code/Magento/SalesGraphQl/Model/Formatter/Order.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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(),

app/code/Magento/SalesGraphQl/Model/Resolver/CreditMemo/CreditMemoComments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

app/code/Magento/SalesGraphQl/Model/Resolver/Invoices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

app/code/Magento/SalesGraphQl/Model/Resolver/Shipments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

dev/tests/api-functional/testsuite/Magento/GraphQl/Sales/RetrieveOrdersByOrderNumberTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

lib/internal/Magento/Framework/Stdlib/DateTime.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
*/
66
namespace 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
/**

0 commit comments

Comments
 (0)