[BUGFIX] Fix date conversion of neg timestamps 25/47025/6
authorDaniel Maier <dani-maier@gmx.de>
Thu, 3 Mar 2016 20:17:21 +0000 (21:17 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 5 Mar 2016 14:10:27 +0000 (15:10 +0100)
commit41b350dc84876c282a7309911287622591b05995
treeeb03615ff09c69334ed284d93b87b3b9b78dd16d
parenta786e4fee665f1c257b7c935694ec18f2f58efc8
[BUGFIX] Fix date conversion of neg timestamps

Date conversion of TCA fields with eval "date" or "datetime" is now also
handled correctly for dates before 1970, thus having a negative
timestamp. Timezone offset is now also applied for those negative
timestamps, in order to prevent erroneous data for dates before 1970.

Furthermore validation handling for dates with zero timestamp
(01.01.1970 midnight UTC) is fixed.

Resolves: #73871
Releases: master, 7.6
Change-Id: Iffa2f12c6941fe17b956202fe9c49f811b1b0539
Reviewed-on: https://review.typo3.org/47025
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf <andreas.wolf@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Form/Element/InputTextElement.php
typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js
typo3/sysext/backend/Tests/Unit/Form/Element/InputTextElementTest.php [new file with mode: 0644]
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php