diff --git a/core/lib/Drupal/Core/Datetime/DateFormatter.php b/core/lib/Drupal/Core/Datetime/DateFormatter.php index 4bee3ac331a9ed610742e0dee574a520df43e77f..cd1c5f31bcfdc1624a29fd6bd6014a29c6174764 100644 --- a/core/lib/Drupal/Core/Datetime/DateFormatter.php +++ b/core/lib/Drupal/Core/Datetime/DateFormatter.php @@ -117,7 +117,6 @@ public function format($timestamp, $type = 'medium', $format = '', $timezone = N // Create a DrupalDateTime object from the timestamp and timezone. $create_settings = [ 'langcode' => $langcode, - 'country' => $this->country(), ]; $date = DrupalDateTime::createFromTimestamp($timestamp, $this->timezones[$timezone], $create_settings); @@ -347,8 +346,13 @@ protected function dateFormat($type, $langcode) { * * @return string * The config setting for country.default. + * + * @deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There will be a contrib replacement. See https://www.drupal.org/node/3439484 + * + * @see https://www.drupal.org/node/3439484 */ protected function country() { + @trigger_error('Calling ' . __METHOD__ . '() is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3439484', E_USER_DEPRECATED); if ($this->country === NULL) { $this->country = \Drupal::config('system.date')->get('country.default'); }