[BUGFIX] Allow 1970-01-01 as native datetime input
The TCA processing temporary converts native datetime inputs to timestamps for some checks. The start of the unix epoch (1970-01-01 00:00) corresponds to the 0 timestamp. Conditionally checks interpreted that as false, resulting the value to be the default value. This fix also prevents empty date values from being set to MySQL-specific values (0000-00-00 00:00:00). Resolves: #92900 Releases: main, 12.4 Change-Id: I979d59f4abe3dd73117a9e135a74ae3036192d9b Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79812 Tested-by:core-ci <typo3@b13.com> Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseRowDateTimeFieldsTest.php 34 additions, 3 deletions...t/Form/FormDataProvider/DatabaseRowDateTimeFieldsTest.php
- typo3/sysext/core/Classes/DataHandling/DataHandler.php 18 additions, 13 deletionstypo3/sysext/core/Classes/DataHandling/DataHandler.php
- typo3/sysext/core/Classes/Database/Query/QueryHelper.php 1 addition, 1 deletiontypo3/sysext/core/Classes/Database/Query/QueryHelper.php
- typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php 85 additions, 0 deletions...3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php
Please register or sign in to comment