Actions
Bug #90413
closedTCA-Configuration: Input-Field with Datetime-frendertype show 'Wrong'-default value in the Backend
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-02-18
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
The Backend should show the default-date `01-01-1970 00:00`. Some Definition show the Time `01-01-1970 00:*32*`
Some of the Default-Definition in the TCA of the column won't work.
'config' => [ 'type' => 'input', 'size' => 30, 'eval' => 'datetime', 'dbType' => 'datetime', 'default' => 0, // okay // 'default' => '1970-01-01 00:00:00', // wrtong shows in backend 01-01-1970 00:32 // 'default' => SelfConst::DEFAULT_START_STOP_TSTAMP, // okay (= 0) // 'default' => SelfConst::DEFAULT_START_STOP_VERSION, // wrong shows in backend 01-01-1970 00:32 (= '1970-01-01 00:00:00') // 'default' => mktime(0,0,0,1,1,1970), // shows in Backend 01-01-1970 00:00 // 'default' => ( new \Datetime( // SelfConst::DEFAULT_START_STOP_VERSION, // new \DateTimeZone(SelfConst::DEFAULT_START_STOP_TIMEZONE)) // )->getTimestamp(), // okay 01-01-1970 00:00 // 'default' => new \DateTime(SelfConst::DEFAULT_START_STOP_VERSION, new DateTimeZone(SelfConst::DEFAULT_START_STOP_TIMEZONE)), // disaster // crash with error-message in IRRE-Element (Error 500 - Internal Server Error) //(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception // PHP Catchable Fatal Error: Object of class DateTime could not be converted to string in /var/www/html/Source/web/typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseRowDefaultValues.php line 61 'readOnly' => true, ],
P.S. The Screenshot in BUG #88450 shows the Default-Time '01.01.1970 01:33`.
Actions