Skip to content

Commit 4cb824e

Browse files
author
Ji Lu
committed
MAGETWO-35603: Test failures when DB is in different timezone
1 parent 948f734 commit 4cb824e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dev/tests/api-functional/testsuite/Magento/Quote/Api/CartRepositoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ public function testGetList()
163163
->setValue($cart->getSubtotal())
164164
->create();
165165

166-
$yesterdayDate = (new \DateTime())->sub(new \DateInterval('P1D'))->format('Y-m-d');
167-
$tomorrowDate = (new \DateTime())->add(new \DateInterval('P1D'))->format('Y-m-d');
166+
$yesterdayDate = (new \DateTime($cart->getCreatedAt()))->sub(new \DateInterval('P1D'))->format('Y-m-d');
167+
$tomorrowDate = (new \DateTime($cart->getCreatedAt()))->add(new \DateInterval('P1D'))->format('Y-m-d');
168168
$minCreatedAtFilter = $this->filterBuilder->setField('created_at')
169169
->setConditionType('gteq')
170170
->setValue($yesterdayDate)

0 commit comments

Comments
 (0)