[BUGFIX] Make date/time fields working again 42/51242/16
authorMarkus Klein <markus.klein@typo3.org>
Wed, 7 Jun 2017 13:47:46 +0000 (15:47 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 9 Jun 2017 13:28:17 +0000 (15:28 +0200)
commitedd26bf243d4221dcb66a104ddeea7f185754f0d
tree7c2dd2d6af9532f31d3e206d00fed0fdd9cd84b4
parentad166708c68f49bc22c64b975ffe6a5b80cbc2ec
[BUGFIX] Make date/time fields working again

This patch solves an issue with time-fields and a couple of
inconsistencies for time(sec), date and datetime fields in BE:

- BackendUtility::time() is superfluous as gmdate() can be used
- Ensure stored data is identical to TYPO3 7
- Only use ISO dates in UTC timezone to communicate with JS
  (time fields use 1970-01-01 as date)
- Only write ISO dates in UTC back to hidden FormEngine fields
- Do that for all date/time fields to simplify JS code
- Take care of necessary timezone conversion for date(time) fields
- Correctly handle manual input
- Fix record titles if a date field is the label field
- Fix wrong Acceptance tests
- Fix wrong Unit tests
- Remove superfluous data-date-offset attribute for DateTimePicker
- Streamline FormEngineValidation date handling code
- Refactor DateTimePicker: fix code duplication, work in UTC only

Resolves: #79249
Releases: master, 8.7
Change-Id: I12ef6b6f59f0843182e093f8f274989161820894
Reviewed-on: https://review.typo3.org/51242
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Johannes Kasberger <johannes.kasberger@reelworx.at>
Tested-by: Johannes Kasberger <johannes.kasberger@reelworx.at>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
14 files changed:
typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php
typo3/sysext/backend/Classes/Form/Element/InputDateTimeElement.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaRecordTitle.php
typo3/sysext/backend/Classes/Utility/BackendUtility.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/AbstractFormElementTest.php
typo3/sysext/belog/Resources/Private/Partials/Content/Filter.html
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Database/QueryGenerator.php
typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/ElementsBasicInputDateCest.php
typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php