Set missing datetime type

Created on 18 April 2025, 24 days ago

Problem/Motivation

I investigate why our view with many dates needs so much time. And I saw that
\Drupal\Core\Datetime\DateFormatter::dateFormat via \Drupal\Core\Datetime\DateFormatter::format was called very often.

\Drupal\smart_date\SmartDateTrait use \Drupal\Core\Datetime\DateFormatter::format.

\Drupal\Core\Datetime\DateFormatter::dateFormat is called when it is not type custom.
, but \Drupal\smart_date\SmartDateTrait set this to empty string, which results into unnecessary calls.

See attached screenshots, before and after the fix.

Steps to reproduce

-

Proposed resolution

Set missing date time type to custom.

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

🐛 Bug report
Status

Active

Version

4.2

Component

Code

Created by

🇩🇪Germany tobiasb Berlin

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024