Skip to content

Commit b4b9720

Browse files
author
Eugene Tulika
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-37705
2 parents 408f73e + 0e037aa commit b4b9720

File tree

3 files changed

+4
-21
lines changed

3 files changed

+4
-21
lines changed

app/code/Magento/Reports/Model/Resource/Report/Collection.php

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,7 @@ protected function _getReport($fromDate, $toDate)
325325
return [];
326326
}
327327
$reportResource = $this->_collectionFactory->create($this->_reportCollection);
328-
$reportResource->setDateRange(
329-
$this->timeShift($fromDate),
330-
$this->timeShift($toDate)
331-
)->setStoreIds(
332-
$this->getStoreIds()
333-
);
328+
$reportResource->setDateRange($fromDate, $toDate)->setStoreIds($this->getStoreIds());
334329
return $reportResource;
335330
}
336331

@@ -354,20 +349,7 @@ public function getReports()
354349
}
355350
return $this->_reports;
356351
}
357-
358-
/**
359-
* Retrieve time shift
360-
*
361-
* @param string $datetime
362-
* @return string
363-
*/
364-
public function timeShift($datetime)
365-
{
366-
return $this->_localeDate->scopeDate(null, $datetime, true)
367-
->setTimezone(new \DateTimeZone('UTC'))
368-
->format('Y-m-d H:i:s');
369-
}
370-
352+
371353
/**
372354
* Load data
373355
*

app/code/Magento/Reports/view/adminhtml/templates/grid.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $numColumns = sizeof($block->getColumns());
2121
<div class="admin__data-grid-header admin__data-grid-toolbar">
2222
<div class="admin__data-grid-header-row">
2323
<?php if ($block->getDateFilterVisibility()): ?>
24-
<div class="admin__filter-actions" id="<?php echo $block->getSuffixId('period_date_range')?>">
24+
<div class="admin__filter-actions" data-role="filter-form" id="<?php echo $block->getSuffixId('period_date_range')?>">
2525
<span class="field-row">
2626
<label for="<?php echo $block->getSuffixId('period_date_from') ?>"
2727
class="admin__control-support-text">

dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,4 +2182,5 @@
21822182
],
21832183
['getIdentities', 'Magento\Sales\Block\Reorder\Sidebar'],
21842184
['assignData', 'Magento\OfflinePayments\Model\Checkmo'],
2185+
['timeShift', 'Magento\Reports\Model\Resource\Report\Collection'],
21852186
];

0 commit comments

Comments
 (0)