Review main Merged

88826[BUGFIX] Use DateTimeFactory for database datetime value interpretation

Benjamin Franzke CR +2 V +2 Hard +149 −145 updated 04/04/25, 07:28

Commit message

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.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Andreas Kienast +1
    • Benni Mack +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Andreas Kienast +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 4

Files 18

Review log 1525

  1. Benjamin Franzke uploaded patch set 1 03/28/25, 12:59

  2. core-ci voted on patch set 1 V -1 03/28/25, 13:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76590

  3. Benjamin Franzke uploaded patch set 2 V -1 03/28/25, 13:27

  4. core-ci voted on patch set 2 V -1 03/28/25, 13:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76592

  5. Benjamin Franzke uploaded patch set 3 V -1 03/28/25, 13:49

  6. core-ci voted on patch set 3 V +1 03/28/25, 13:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76595

  7. Benjamin Franzke rebased onto patch set 4 V +1 03/28/25, 15:30

  8. core-ci voted on patch set 4 V +1 03/28/25, 15:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76600

  9. Benjamin Franzke uploaded patch set 5 V +1 03/28/25, 21:01

  10. core-ci voted on patch set 5 V -1 03/28/25, 21:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76613

  11. Benjamin Franzke uploaded patch set 6 V -1 03/29/25, 12:55

  12. core-ci voted on patch set 6 V -1 03/29/25, 13:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76636

  13. Benjamin Franzke rebased onto patch set 7 V -1 03/29/25, 13:39

  14. core-ci voted on patch set 7 V +1 03/29/25, 13:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76640

  15. Benjamin Franzke updated the commit message in patch set 8 V +1 03/31/25, 07:27

  16. core-ci voted on patch set 8 V +1 03/31/25, 07:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76710

  17. Benjamin Franzke rebased onto patch set 9 V +1 04/02/25, 10:41

  18. core-ci voted on patch set 9 V +1 04/02/25, 10:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76865

  19. Benni Mack commented on patch set 9 CR +1 V +1 04/02/25, 16:00

    everything still works as expected
  20. Benjamin Franzke uploaded patch set 10 CR +1 V +1 04/03/25, 18:49

  21. core-ci voted on patch set 10 V +1 04/03/25, 18:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76965

  22. Andreas Kienast voted on patch set 10 CR +1 V +1 04/04/25, 07:12

  23. Benni Mack voted on patch set 10 CR +1 V +1 04/04/25, 07:22

  24. Georg Ringer voted on patch set 10 CR +2 V +2 04/04/25, 07:28

  25. Georg Ringer merged patch set 11 04/04/25, 07:28