Issue Bug Resolved

#111434Date form element stores the time of submission

Josua Vogel 11/13/26, 10:57 updated 11/18/26, 08:00

Description

The “Date” form element (native <input type="date">) submits a plain date,
but TYPO3\CMS\Form\Domain\Model\FormElements\Date configures the
DateTimeConverter with the format “Y-m-d”. DateTime::createFromFormat()
fills the missing time fields with the current time, so the resulting
DateTime carries the time of the request.

Example: submitting 2026-11-20 at 10:49 results in 2026-11-20 10:49:42.
With the SaveToDatabase finisher (default dateFormat “U”) this time ends
up in the record, e.g. in “starttime”.

The behaviour is inconsistent: if a DateRange validator is configured,
the validator calls modify(‘midnight’) on the value and the stored time
is 00:00:00. Without the validator it is the time of submission.

Expected: a date-only value is normalized to midnight (00:00:00).

Reviews 1

History 25

  1. Josua Vogel commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-18T08:00:15+00:00" > 11/18/26, 08:00 </span>

    Applied in changeset commit:a8c8e3af8e6daa22224c7838277a6a9561b73704.