You are here

public function DateTimePlus::render in Service Container 7

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

Renders the timezone name.

Return value

string

Overrides ToStringTrait::render

File

lib/Drupal/Component/Datetime/DateTimePlus.php, line 281
Contains \Drupal\Component\Datetime\DateTimePlus.

Class

DateTimePlus
Wraps DateTime().

Namespace

Drupal\Component\Datetime

Code

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