Review main Merged

86917[BUGFIX] Fix rendering of native datetime fields as record title

Benjamin Franzke CR +2 V +2 Easy +13 −1 updated 11/18/24, 08:59

Commit message

FormDataProvider\DatabaseRowDateTimeFields misinterprets the native
LOCALTIME datetime value as UTC and creates an invalid ISO8601
datetime string in the current server timezone based on the incorrectly
assumed UTC base value, which means the time value has an effective
timezone offset that matches the current server timezone.

As a backportable workaround the timezone offset is now normalized back
to LOCALTIME, as a change to DatabaseRowDateTimeFields would be
considered breaking.
This ugly workaround will be removed with a refactoring of
DatabaseRowDateTimeFields to use unqualified ISO8601 localtime
in #105549.

Review

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

Issues 2

Files 1

Review log 1215

  1. Benjamin Franzke uploaded patch set 1 11/07/24, 13:01

  2. Benjamin Franzke commented on patch set 1 11/07/24, 13:03

    TcaRecordTitle.php:398

    Please see following change which shows how this hack will be normalized to clean code: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86888/11/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaRecordTitle.php
  3. core-ci voted on patch set 1 V +1 11/07/24, 13:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69187

  4. Benjamin Franzke uploaded patch set 2 V +1 11/07/24, 13:59

  5. Andreas Kienast commented on patch set 2 CR +1 11/07/24, 14:03

    TcaRecordTitle.php:393

    misinterprets

    TcaRecordTitle.php:395

    time value
  6. Benjamin Franzke uploaded patch set 3 CR +1 11/07/24, 14:06

  7. Benjamin Franzke commented on patch set 3 11/07/24, 14:06

    TcaRecordTitle.php:393 Reply

    Done

    TcaRecordTitle.php:395 Reply

    Done
  8. core-ci voted on patch set 2 V +1 11/07/24, 14:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69194

  9. core-ci voted on patch set 3 V +1 11/07/24, 14:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69197

  10. Andreas Kienast voted on patch set 3 CR +1 V +1 11/07/24, 14:29

  11. Benni Mack voted on patch set 3 CR +1 11/12/24, 14:18

  12. Benjamin Franzke commented on patch set 3 11/15/24, 16:52

    Hint for testing: Set a non-UTC timezone, e.g.: $GLOBALS['TYPO3_CONF_VARS']['SYS']['phpTimeZone'] = 'Europe/Berlin'; Set inputdatetime_4 as a label in typo3/sysext/styleguide/Configuration/TCA/tx_styleguide_elements_basic.php ``` 'ctrl' => [ 'label' => 'inputdatetime_4', ``` Compare FormEngine header (one hour off) to inputdatetime_4 value in datepicker (correct) and list view (correct).
  13. Benni Mack commented on patch set 3 V +1 11/15/24, 21:43

    thanks!
  14. Benjamin Franzke voted on patch set 3 CR +2 V +2 11/18/24, 08:59

  15. Benjamin Franzke merged patch set 4 11/18/24, 08:59