Review main Merged

92056[FEATURE] Add "datetimesec" TCA FormEngine format option

Garvin Hicking CR +2 V +2 Hard +462 −56 updated 01/17/26, 11:13

Commit message

Currently, TCA only supports flatpickr date instances
with a "HH:MM" picker to enter the hour and minute, but
not "HH:MM:SS" to also support adding seconds.

There is only a dedicated "timesec" format, which does
not have a date associated with it.

This patch adds a "datetimesec" option, that acts just
like "datetime" would, but also support entering
seconds. This format is only valid for the integer-based
storage `dbType`, or `dbType=datetime`. Using other
`dbType` settings ("date", "time") will throw an
exception hinting at misconfiguration.

Tests are adapted to cover the scenario with additional
second input.

With a drive-by change a phpstan baseline entry is
removed that covers a misaligned phpdoc adjustment
so that $itemValue could also carry a NULL value.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Georg Ringer +1
    • Josua Vogel +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Georg Ringer +1
    • Josua Vogel +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 46

Show 26 more files

Review log 2733

Show 58 earlier messages
  1. Garvin Hicking uploaded patch set 1 12/09/25, 11:04

  2. core-ci voted on patch set 1 V -1 12/09/25, 11:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91877

  3. Garvin Hicking uploaded patch set 2 V -1 12/09/25, 19:14

  4. core-ci voted on patch set 2 V -1 12/09/25, 19:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91927

  5. Garvin Hicking uploaded patch set 3 V -1 12/09/25, 19:29

  6. core-ci voted on patch set 3 V +1 12/09/25, 19:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91928

  7. Georg Ringer commented on patch set 3 12/09/25, 20:18

    nice one!

    BackendUtility.php:888

    at least return type would be nice
  8. Oli Bartsch commented on patch set 3 12/09/25, 20:29

    This should be a separate patch please.
  1. Stefan Bürk commented on patch set 3 12/09/25, 21:04

    Reply

    And if you are on it to extract into dedicated patchen .. can we please move the `Build/Scripts/rst*.rst` template files in dedicated folder to have them not directly on the same level like the scripts, please ? * `Build/rstTemplate/*.rst` (would prefer that one) * `Build/Scripts/rstTemplates/*.rst` * ... for example. Thanks.
  2. Garvin Hicking commented on patch set 3 CR -1 12/09/25, 21:25

    Reply

    Yes, good idea. Will do that tomorrow.
  3. Garvin Hicking commented on patch set 3 12/09/25, 21:26

    BackendUtility.php:888 Reply

    Will do for the new method; my intent was to go low-impactful, but I see that types are mandatory for new code. Thanks!
  4. Garvin Hicking uploaded patch set 4 CR -1 V +1 12/10/25, 08:03

  5. Garvin Hicking commented on patch set 4 12/10/25, 08:04

    BackendUtility.php:888 Reply

    Done
  6. core-ci voted on patch set 4 V +1 12/10/25, 08:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91966

  7. Benjamin Franzke commented on patch set 4 12/10/25, 13:17

    DefaultConfigurationDescription.yaml:93

    Let's not add a new option for the formatting of this type, we do not have an option for `timesec` either, which is (i guess) because editing times including seconds basically always requires `H:i:s` (in all timezones)? Or maybe I'm mistaken?

    Feature-108431-AddTCAdatetimeformatdatetimesecoption.rst:50

    Maybe we should just validate and disallow such configuration, alhtough we (unfortunately do not do that for older, invalid combinations)?
  8. Garvin Hicking commented on patch set 4 12/10/25, 13:58

    DefaultConfigurationDescription.yaml:93 Reply

    I was secretly hoping you'd say that, it would reduce complexity of course. I didn't check too much into the timesec->time parsing (because my use case only covered "datetime" cases), so I was not sure because "datetime" offered this flexibility that we would need it for displaying the "hor/minute/seconds" part of that. I can happily fixate this on "H:i:s" if there's no disagreement.

    Feature-108431-AddTCAdatetimeformatdatetimesecoption.rst:50 Reply

    I kind of regarded this as a "feature" to be able to use the "full picker" and still normalize seconds away from the input. There is some code that chooses the allowed format depending on the dbType which I could use for it. But for now I thought we could keep it broadly to allow configurations, that I couldn't rule out as useful. Also here I'm happy to add restrictions to this, whatever the agreement would be. I'm not fighting for it. ;)
  9. Garvin Hicking uploaded patch set 5 V +1 12/11/25, 07:50

  10. Garvin Hicking commented on patch set 5 12/11/25, 07:52

    DefaultConfigurationDescription.yaml:93 Reply

    I thought about this some more and think a fixed 'H:i:s' is fine, adjusted the patch.

    Feature-108431-AddTCAdatetimeformatdatetimesecoption.rst:50 Reply

    I modified the patch now to throw an exception for this misconfiguration, please check if the wording is fine with you.
  11. core-ci voted on patch set 5 V +1 12/11/25, 07:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92051

  12. Simon Schaufelberger voted on patch set 5 CR +1 12/11/25, 13:52

  13. Christian Kuhn commented on patch set 5 12/11/25, 21:01

    this looks good to me an reading at first glance already. i hope to find a slot to give it a testing slot within the next couple of days before it gets merged.
  14. Christian Kuhn commented on patch set 5 12/11/25, 21:03

    BackendUtility.php:889

    i'm not a huge fan of this stupid helper, but it follows exactly the other ones we have for so long already, soo ... well. it is how it is.
  15. Garvin Hicking uploaded patch set 6 CR +1 V +1 12/18/25, 05:58

    fix merge conflict
  16. core-ci voted on patch set 6 V +1 12/18/25, 06:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92392

  17. Georg Ringer voted on patch set 6 CR +1 V +1 12/18/25, 06:34

  18. Benni Mack commented on patch set 6 12/18/25, 07:38

    DefaultConfigurationDescription.yaml:93 Reply

    I wanted to write the same thing. However, I suggest we switch to one of the native "locale-formatted" time formats.
  19. Garvin Hicking commented on patch set 6 12/18/25, 07:46

    DefaultConfigurationDescription.yaml:93 Reply

    Just for "H:i:s"? Because I know of no shorthand for it. And otherwise we'd lose the costumizatiin that ddhhyy offers analoguesy to datetime. Also we need no locale in H:i:s?
  20. Benni Mack commented on patch set 6 12/19/25, 08:27

    DefaultConfigurationDescription.yaml:93 Reply

    Done
  21. Simon Schaufelberger voted on patch set 6 CR +1 V +1 01/17/26, 10:59

  22. Josua Vogel voted on patch set 6 V +1 01/17/26, 10:59

  23. Josua Vogel voted on patch set 6 CR +1 01/17/26, 11:01

  24. Garvin Hicking voted on patch set 6 CR +2 V +2 01/17/26, 11:13

  25. Garvin Hicking merged patch set 7 01/17/26, 11:13