-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Closed
Copy link
Labels
Fixed in 2.1.xThe issue has been fixed in 2.1 release lineThe issue has been fixed in 2.1 release lineFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passed
Description
Preconditions
- Set Timezone "Central European Standard Time (Europe/Berlin)" at the STORE->CONFIGURATION->GENERAL->General->Local options-> Timezone and save configuration
- Create orders at 31-st day of a month which has this date (May will be used for example)
Steps to reproduce
- Go to the Reports adminhtml menu "Products">"Ordered" grid
- Select "From" - 01.05.2018
- Select "To" - 31.05.2018
- Select "Show by" - Month
- Hit refresh
Expected result
- Orders that were created at 31.05.2018 are in the grid
Actual result
- Orders that were created at 31.05.2018 are NOT in the grid
Comment:
MAGE_ROOT/vendor/magento/module-reports/Model/ResourceModel/Report/Collection.php:218
$interval['end'] filled with 30.05.2018 instead of 31.05.2018
My solution:
Replace: $dateStart->format('Y-m-' . date('t', $dateStart->getTimestamp()) . ' 23:59:59')
with:
$dateStart->format('Y-m-' . cal_days_in_month(CAL_GREGORIAN, $dateStart->format('m'), $dateStart->format('Y')) . ' 23:59:59')
System:
Ububntu16.04/MySQL5.7/PHP7.0
Metadata
Metadata
Assignees
Labels
Fixed in 2.1.xThe issue has been fixed in 2.1 release lineThe issue has been fixed in 2.1 release lineFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passed