Revert "[BUGFIX] Object passed to date()"

This reverts commit d361b2999c8ba8d1cdb218ead4f60ef1de9fe458

The change I6821bafa51372c50d8903c63d62ea44933bc12b3 does not
apply to 4.5 and 4.7, since $task is not an object in these
versions.

Change-Id: I10a214e6d7218cb17dbf49583f266d30e180097b
Releases: 4.5, 4.7
Resolves: #54120
Reviewed-on: https://review.typo3.org/25846
Reviewed-by: Philipp Gampe
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel