[TASK] Use ISO-8601 dates for display and processing 24/47124/16
authorAndreas Wolf <andreas.wolf@typo3.org>
Sat, 5 Mar 2016 22:51:56 +0000 (23:51 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Fri, 2 Dec 2016 17:11:05 +0000 (18:11 +0100)
commit75beb3fdf5954380011ebe09bfd1fe4464479f21
treed801e0d4c955cd593aba5757e3ff2c8632262a63
parent29c3fad7113ff263dd51fef45d033ac4673bab03
[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>
typo3/sysext/backend/Classes/Form/Element/InputTextElement.php
typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseRowDateTimeFields.php
typo3/sysext/backend/Resources/Public/JavaScript/DateTimePicker.js
typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js
typo3/sysext/backend/Tests/JavaScript/FormEngineValidationTest.js
typo3/sysext/backend/Tests/Unit/Form/Element/InputTextElementTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseRowDateTimeFieldsTest.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Documentation/Changelog/master/Important-77702-CustomRenderTypesForDateAndDatetimeFieldsMustUseISO-8601.rst [new file with mode: 0644]