Change record status: 
Project: 
Introduced in branch: 
8.0.x
Description: 

The datetime theme hook outputs a <time> HTML tag so it was renamed to time and the template has been renamed from datetime.html.twig to time.html.twig.

The change was also made to avoid confusion with '#type' => 'datetime' which outputs a datetime form element.

If you are using this theme hook you will see an error starting with:

Twig_Error_Loader: Unable to find template "core/modules/system/templates/datetime.html.twig"

To fix this, change '#theme' => 'datetime' to '#theme' => 'time'.

If you've overridden this template in your theme, the datetime.html.twig overrides will need to be renamed.

Before:

$elements[$delta] = array(
  '#theme' => 'datetime',
  '#text' => $formatted_date,
  '#html' => FALSE,
  '#attributes' => array(
    'datetime' => $iso_date,
  ),
);

After:

$elements[$delta] = array(
  '#theme' => 'time',
  '#text' => $formatted_date,
  '#html' => FALSE,
  '#attributes' => array(
    'datetime' => $iso_date,
  ),
);
Impacts: 
Module developers
Themers