Bug #62660
closedCopying Date- and Datetime-Fields
100%
Description
A Field is defined as datetime in the TCA:
'start' => array( // ... 'config' => array( 'dbType' => 'datetime', // ... ), ),
The value gets correctly written to the database.
But when copying an entity in the backend and so copying the field, it shows something strange like "0:33 01-01-1970".
I've tracked this down to here:
// TYPO3\CMS\Core\DataHandling\DataHandler, Line 950 $incomingFieldArray[$column] = $incomingFieldArray[$column] ? gmdate($format, $incomingFieldArray[$column]) : $emptyValue;
Typo3 tries to format the already correctly formatted date-string.
The solution in my case was this check:
if (is_numeric($incomingFieldArray[$column])) { $incomingFieldArray[$column] = $incomingFieldArray[$column] ? gmdate($format, $incomingFieldArray[$column]) : $emptyValue; }
Updated by Mathias Schreiber almost 10 years ago
- Target version set to 7.1 (Cleanup)
Updated by Benni Mack over 9 years ago
- Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Benni Mack about 9 years ago
- Target version changed from 7.5 to 7 LTS
Updated by Mathias Schreiber about 9 years ago
- Target version changed from 7 LTS to 8 LTS
- Tags set to Datetime
Updated by Gerrit Code Review almost 9 years ago
- Status changed from New to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46426
Updated by Nicole Cordes over 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 735efdaecb9eda5389333b5187f5053e1b4a175a.
Updated by Gerrit Code Review about 8 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50672
Updated by Gerrit Code Review about 8 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50673
Updated by Gerrit Code Review about 8 years ago
Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50673
Updated by Gerrit Code Review about 8 years ago
Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50673
Updated by Nicole Cordes almost 8 years ago
- Status changed from Under Review to Resolved
Applied in changeset bab723b055578ff7a2991c5a070a4e7dc5d251b4.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed