Commit cbeddfd1 authored by Jigal van Hemert's avatar Jigal van Hemert Committed by Morton Jonuschat
Browse files

[BUGFIX] Use correct timezone in DataMapperTest

The date/time generated by the datamapper is in UTC, so the test
must check for a date/time in that timezone too independent of the
configured timezone of the system.

Resolves: #75954
Releases: master, 7.6
Change-Id: I64f014b0d60b805bcbffd08dc50b924b925d022a
Reviewed-on: https://review.typo3.org/47945


Reviewed-by: Nicole Cordes's avatarNicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes's avatarNicole Cordes <typo3@cordes.co>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
parent 9ec64125
......@@ -275,7 +275,7 @@ class DataMapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
$columnMap = new ColumnMap('column_name', 'propertyName');
$columnMap->setDateTimeStorageFormat('datetime');
$datetimeAsString = '2013-04-15 09:30:00';
$input = new \DateTime($datetimeAsString);
$input = new \DateTime($datetimeAsString, new \DateTimeZone('UTC'));
$this->assertEquals('2013-04-15 09:30:00', $subject->getPlainValue($input, $columnMap));
$columnMap->setDateTimeStorageFormat('date');
$this->assertEquals('2013-04-15', $subject->getPlainValue($input, $columnMap));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment