Bug #105550
closed(pseudo) Native dbType=datetime strings in flexforms not working and interpreted as integer
100%
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 15 days 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 15 days 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 15 days 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 15 days 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 15 days 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
Updated by Gerrit Code Review 1 day ago
Patch set 1 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87067
Updated by Gerrit Code Review 1 day ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87068
Updated by Benjamin Franzke 1 day ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 55ab3de74f9c24af0705e064bcb1ed3471643a36.