Actions
Bug #105550
open(pseudo) Native dbType=datetime strings in flexforms not working and interpreted as integer
Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2024-11-06
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
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
Actions