You are here

public function DateTimePlus::render in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/Datetime/DateTimePlus.php \Drupal\Component\Datetime\DateTimePlus::render()
  2. 9 core/lib/Drupal/Component/Datetime/DateTimePlus.php \Drupal\Component\Datetime\DateTimePlus::render()

Renders the timezone name.

Return value

string

File

core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 325

Class

DateTimePlus
Wraps DateTime().

Namespace

Drupal\Component\Datetime

Code

public function render() {
  return $this
    ->format(static::FORMAT) . ' ' . $this
    ->getTimeZone()
    ->getName();
}