diff -u b/core/includes/common.inc b/core/includes/common.inc --- b/core/includes/common.inc +++ b/core/includes/common.inc @@ -344,7 +344,7 @@ * @see https://www.drupal.org/node/2999991 */ function date_iso8601($date) { - @trigger_error('date_iso8601() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use date("c", $timestamp) instead. See https://www.drupal.org/node/2999991.', E_USER_DEPRECATED); + @trigger_error('date_iso8601() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use date("c", $date) instead. See https://www.drupal.org/node/2999991.', E_USER_DEPRECATED); // The DATE_ISO8601 constant cannot be used here because it does not match // date('c') and produces invalid RDF markup. return date('c', $date); diff -u b/core/modules/rdf/tests/src/Kernel/RdfaAttributesTest.php b/core/modules/rdf/tests/src/Kernel/RdfaAttributesTest.php --- b/core/modules/rdf/tests/src/Kernel/RdfaAttributesTest.php +++ b/core/modules/rdf/tests/src/Kernel/RdfaAttributesTest.php @@ -57,7 +57,7 @@ $datatype = 'xsd:dateTime'; $date = 1252750327; - $iso_date = date('c', $date); + $iso_date = $this->container->get('date.formatter')->format($date, 'custom', 'c', 'UTC'); $mapping = [ 'datatype' => $datatype, @@ -70,7 +70,7 @@ 'content' => $iso_date, ]; - $this->_testAttributes($expected_attributes, $mapping, $date); + $this->_testAttributes($expected_attributes, $mapping, ['value' => $date]); } /**