Skip to content

Commit bc581c8

Browse files
committed
Merge remote-tracking branch 'origin/MC-19218' into 2.3.3-develop-pr69
2 parents 6530573 + 77d6f41 commit bc581c8

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,7 @@ public function date($date = null, $locale = null, $useTimezone = true, $include
196196
public function scopeDate($scope = null, $date = null, $includeTime = false)
197197
{
198198
$timezone = $this->_scopeConfig->getValue($this->getDefaultTimezonePath(), $this->_scopeType, $scope);
199-
$date = new \DateTime(is_numeric($date) ? '@' . $date : $date);
200-
$date->setTimezone(new \DateTimeZone($timezone));
199+
$date = new \DateTime(is_numeric($date) ? '@' . $date : $date, new \DateTimeZone($timezone));
201200
if (!$includeTime) {
202201
$date->setTime(0, 0, 0);
203202
}

lib/internal/Magento/Framework/Stdlib/Test/Unit/DateTime/TimezoneTest.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,4 @@ private function scopeConfigWillReturnConfiguredTimezone($configuredTimezone)
253253
{
254254
$this->scopeConfig->method('getValue')->with('', '', null)->willReturn($configuredTimezone);
255255
}
256-
257-
public function testCheckIfScopeDateSetsTimeZone()
258-
{
259-
$scopeDate = new \DateTime('now', new \DateTimeZone('America/Vancouver'));
260-
$this->scopeConfig->method('getValue')->willReturn('America/Vancouver');
261-
262-
$this->assertEquals(
263-
$scopeDate->getTimezone(),
264-
$this->getTimezone()->scopeDate(0, $scopeDate->getTimestamp())->getTimezone()
265-
);
266-
}
267256
}

0 commit comments

Comments
 (0)