Skip to content

Commit 8ba0c79

Browse files
committed
ACP2E-4239: Date Filter not working according to store timezone on Credit Memos grid
1 parent aa18fe4 commit 8ba0c79

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/code/Magento/Customer/Model/ResourceModel/Grid/Collection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ class Collection extends SearchResult
2626
private $localeResolver;
2727

2828
/**
29-
* @inheritdoc
29+
* @var string
3030
*/
3131
protected $document = Document::class;
3232

3333
/**
34-
* @inheritdoc
34+
* @var array
3535
*/
3636
protected $_map = ['fields' => ['entity_id' => 'main_table.entity_id']];
3737

app/code/Magento/Ui/Test/Unit/Component/Filters/Type/DateTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ private function processFilters(
224224
): void {
225225
if (is_string($filterData[$name])) {
226226
$uiComponent->expects(static::once())
227-
->method($showsTime ? 'convertDatetime' : 'convertDate')
227+
->method($showsTime ? 'convertDatetime' : 'convertDateWithTimezone')
228228
->with($filterData[$name])
229229
->willReturn(new \DateTime($filterData[$name]));
230230
} else {
@@ -241,7 +241,7 @@ private function processFilters(
241241
} else {
242242
$from = new \DateTime($filterData[$name]['from'] ?? 'now');
243243
$to = new \DateTime($filterData[$name]['to'] ? $filterData[$name]['to'] . ' 23:59:59' : 'now');
244-
$uiComponent->method('convertDate')
244+
$uiComponent->method('convertDateWithTimezone')
245245
->willReturnMap(
246246
[
247247
[$filterData[$name]['from'], 0, 0, 0, true, $from],

0 commit comments

Comments
 (0)