[TASK] Use ISO-8601 dates for display and processing
This changes the internal date processing for FormEngine and DataHandler to use ISO-8601 dates including a proper timezone. Dates are converted to ISO-8601 as early as possible and converted back to UNIX timestamps as late as possible. As before, the database values are always values in the server’s timezone, interpreted as UTC. Also, the client side inputs are interpreted as UTC. The main advantage is that once and for all we get rid of the timezone issues that may potentially arise if the server and client use different timezones. Additionally, the values are human readable (which is of course not so much of an issue for hidden fields) and we can directly use Moment.js for all heavy lifting. Another big advantage is that we can make the date formats configurable and decouple displayed dates and internally stored dates (by putting the Moment objects to the input fields). Change-Id: I3461915c2beaa96cd29c52c60e65a2e5005065b7 Resolves: #77702 Releases: master Reviewed-on: https://review.typo3.org/47124 Reviewed-by:Susanne Moog <susanne.moog@typo3.org> Tested-by:
Susanne Moog <susanne.moog@typo3.org> Tested-by:
TYPO3com <no-reply@typo3.com> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
Oliver Hader <oliver.hader@typo3.org>
Showing
- typo3/sysext/backend/Classes/Form/Element/InputTextElement.php 10 additions, 2 deletions.../sysext/backend/Classes/Form/Element/InputTextElement.php
- typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseRowDateTimeFields.php 7 additions, 2 deletions...asses/Form/FormDataProvider/DatabaseRowDateTimeFields.php
- typo3/sysext/backend/Resources/Public/JavaScript/DateTimePicker.js 12 additions, 10 deletions...ext/backend/Resources/Public/JavaScript/DateTimePicker.js
- typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js 38 additions, 19 deletions...ckend/Resources/Public/JavaScript/FormEngineValidation.js
- typo3/sysext/backend/Tests/JavaScript/FormEngineValidationTest.js 98 additions, 0 deletions...sext/backend/Tests/JavaScript/FormEngineValidationTest.js
- typo3/sysext/backend/Tests/Unit/Form/Element/InputTextElementTest.php 4 additions, 4 deletions.../backend/Tests/Unit/Form/Element/InputTextElementTest.php
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseRowDateTimeFieldsTest.php 2 additions, 2 deletions...t/Form/FormDataProvider/DatabaseRowDateTimeFieldsTest.php
- typo3/sysext/core/Classes/DataHandling/DataHandler.php 19 additions, 16 deletionstypo3/sysext/core/Classes/DataHandling/DataHandler.php
- typo3/sysext/core/Documentation/Changelog/master/Important-77702-CustomRenderTypesForDateAndDatetimeFieldsMustUseISO-8601.rst 16 additions, 0 deletions...tomRenderTypesForDateAndDatetimeFieldsMustUseISO-8601.rst
Please register or sign in to comment