Project

General

Profile

Bug #68849 ยป patch.diff

Patch that removes the time zone conversion during DB read - Sebastian Mazza, 2015-08-07 18:06

View differences:

typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php
return NULL;
} elseif ($storageFormat === 'date' || $storageFormat === 'datetime') {
// native date/datetime values are stored in UTC
$utcTimeZone = new \DateTimeZone('UTC');
$utcDateTime = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($targetType, $value, $utcTimeZone);
$currentTimeZone = new \DateTimeZone(date_default_timezone_get());
return $utcDateTime->setTimezone($currentTimeZone);
//$utcTimeZone = new \DateTimeZone('UTC');
//$utcDateTime = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($targetType, $value, $utcTimeZone);
//$currentTimeZone = new \DateTimeZone(date_default_timezone_get());
//return $utcDateTime->setTimezone($currentTimeZone);
return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($targetType, $value);
} else {
return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($targetType, date('c', $value));
}
    (1-1/1)