Bug #105550
open(pseudo) Native dbType=datetime strings in flexforms not working and interpreted as integer
0%
Description
With dbType=datetime
in a flexform:
<inputDateTime_4>
<label>inputDateTime_4 dbType=datetime format=date</label>
<config>
<type>datetime</type>
<format>date</format>
<dbType>datetime</dbType>
</config>
</inputDateTime_4>
The value is interpreted as integer instead of as a string because the DatabaseRowDateTimeFields
is only applied to real columns and not to flexform columns.
Which then results in flexform dbType datetime's to be interpreted as integers by:
https://github.com/TYPO3/typo3/blob/3343d780e6438a8de02494717fb5761e461f65b9/Build/Sources/TypeScript/backend/form-engine-validation.ts#L156
Therefore a database value like 1960-01-01 05:42:23
is interpreted as 1960
seconds (unix timestamp) which results in a fake-date to be calculated: 1970-01-01T00:32:40Z
(32:40 because 1960 = 32 * 60 + 40
)
As a result the date is 1970 instead of 1960 as shown below:
Files
Updated by Gerrit Code Review about 11 hours ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86912
Updated by Gerrit Code Review about 10 hours ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86912
Updated by Gerrit Code Review about 10 hours ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86912
Updated by Gerrit Code Review about 10 hours ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86912
Updated by Gerrit Code Review about 9 hours ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86912