Skip to content
Snippets Groups Projects
typo3

typo3

Project ID: 81
user avatar
Benjamin Franzke authored
Fix display of native datetime fields in TCA record titles when
timezone is not UTC and apply `DateTimeFactory::createFromTimestamp()`
where the `(new DateTimeImmutable())->setTimestamp()` approach has been
used to workaround the PHP issue that direct `DateTime` creation from
timestamps does not respect current PHP timezone. The usage of the
`DateTimeFactory::createFromTimestamp()` wrapper hopefully helps to make
the intent of this chain clear and to prevent recreating the same
issue in new code as in #106453.

Also adapt one aspect of the recently introduced DateTimeFactory
to correctly initialize integer based format=time(sec) fields
independent from current daylight saving time offset and add
missing unit tests to TcaRecordTitleTest for this case.

Extbase DateTime resolution will be address with a separate patch
and is marked as a TODO for the time being.

Releases: main, 13.4
Resolves: #96890
Related: #98045
Related: #103693
Related: #106453
Change-Id: I92c3fb86b1267821336988756f8bba966568af82
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/88826


Tested-by: default avatarAndreas Kienast <akienast@scripting-base.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarAndreas Kienast <akienast@scripting-base.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
da29fc6f
History
Name Last commit Last update