Feature #72053
closedEpic #77562: Misbehaviors with datetime values and timezones
Extbase: Support \DateTimeInterface instead of \DateTime
100%
Description
Extbase supports conversion from and to \DateTime objects in several situations. But you cannot work with \DateTimeImmutable or other implementations of the \DateTimeInterface.
Extbase should support working with the interface instead of the concrete class.
Updated by Sebastian Michaelsen over 8 years ago
As far as I see this would affect the following things would need to be changed:
- Wrong: When loading a database record into a model object, the
DataMapper
creates a\DateTime
object even when the property is annotated as\DateTimeImmutable
. - Wrong: When saving a model to the database the
\TYPO3\CMS\Extbase\Persistence\Generic\Backend
results in an exception because->getPlainValue()
doesn't convert\DateTimeImmutable
to a timestamp. - More or less right: The DateTimeConverter doesn't force
\DateTime
but performs duck typing (is_callable(array($targetType, 'createFromFormat'))
). But the override feature (->overrideTimeIfSpecified()
) forces the first paramter to be\DateTime
.
Updated by Riccardo De Contardi about 7 years ago
- Target version changed from 8 LTS to 9.0
Updated by Mona Muzaffar about 7 years ago
- Related to Epic #80852: Datetime handling in backend added
Updated by Riccardo De Contardi almost 7 years ago
- Related to deleted (Epic #80852: Datetime handling in backend)
Updated by Gerrit Code Review almost 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57388
Updated by Gerrit Code Review almost 6 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57388
Updated by Gerrit Code Review over 5 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57388
Updated by Gerrit Code Review over 5 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57388
Updated by Gerrit Code Review over 5 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57388
Updated by Gerrit Code Review over 5 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57388
Updated by Benni Mack over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset aabe5f71748f67e4b4866b5af68290dba4e08c6a.
Updated by Benni Mack almost 5 years ago
- Status changed from Resolved to Closed
Updated by Benni Mack about 4 years ago
- Related to Bug #73637: Extbase DateTimeConverter cannot handle negative timestamps added
Updated by Volker Diels-Grabsch about 4 years ago
- Related to Bug #90992: Fix programming error that only works for subtle reasons added