Bug #90413
closedTCA-Configuration: Input-Field with Datetime-frendertype show 'Wrong'-default value in the Backend
100%
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`.
Updated by Dieter Porth almost 5 years ago
The missing renderType in the definition does not change the result.
Updated by Dieter Porth almost 5 years ago
- Related to Bug #88450: Default value ist show on datetime fields by readOnly added
Updated by Dieter Porth almost 5 years ago
Sorry, forgotten
Definition of Column in Table
.... startversion datetime DEFAULT '1970-01-01 00:00:00' COMMENT 'start-version only for information; doubled with entry in hygieneplan', ....
Updated by Gerrit Code Review over 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63626
Updated by Gerrit Code Review over 4 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63738
Updated by Benni Mack over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b88a0af685ecb6770e634d30b43a4b0a03637f7c.
Updated by Oliver Bartsch about 4 years ago
- Related to Bug #89967: Invalid date representation when readOnly in TCA added