Issue Bug Under Review Stale

#109195Timezone in f:format.date Viewhelper isn't respected when using pattern

Julian Pohl 03/09/26, 20:05 updated 08/06/26, 19:40

Description

Calling the ViewHelper with a defined timezone and format works correctly.
However, when using pattern instead of format, the formatting does not work as expected. In this case, the date string is always formatted using the PHP default timezone.

*The issue*
In TYPO3\CMS\Core\Localization\DateFormatter , within the format method, the IntlDateFormatter is instantiated without passing the timezone of the date object. As a result, the timezone information from the date object is lost during the formatting process.

*Example fix*
When creating the IntlDateFormatter, the timezone from the date object should be passed explicitly:
@new \IntlDateFormatter($locale, \IntlDateFormatter::FULL, \IntlDateFormatter::FULL, $date->getTimezone(), …);@
This ensures that the formatter uses the correct timezone associated with the date object.

Reviews 1

History 13

  1. Garvin Hicking commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2026-03-09T20:55:23+00:00" > 03/09/26, 20:55 </span>

    Hi Julian!

    That sounds like a plausible discovery. Would you maybe like to contribute a patch? I can help to guide you if you need help for it.

    Thanks,
    Garvin

  2. Gerrit Code Review pushed patch set 1 for main to change 95136 status Needs Feedback Under Review <span data-processor="relativetime" data-value="2026-08-06T19:38:07+00:00" > 08/06/26, 19:38 </span>