#73637Extbase DateTimeConverter cannot handle negative timestamps
Description
Using negative unix timestamp (signed integer, before unix epoch), \TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter fails to convert from timestamp to \DateTime.
This happens because \DateTime::createFromFormat(‘U’, $timestamp) does not support negative timestamps.
\DateTime::__construct() as well as \DateTime::setTimestamp() do the job – though they treat timezones differently.
$date = new \DateTime('@' . $timestamp));
or
$date = (new \DateTime())->setTimestamp($timestamp);
The converter class seems to be intended somewhat independent of target type. That‘s why I‘m unsure both about how to write test and implementation.
Any suggestions?