public function DateTimePlus::__toString

Implements __toString() for dates.

The base DateTime class does not implement this.

See also

https://bugs.php.net/bug.php?id=62911

http://www.serverphorums.com/read.php?7,555645

File

drupal/core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 215
Definition of Drupal\Component\Datetime\DateTimePlus

Class

DateTimePlus
Extends DateTime().

Namespace

Drupal\Component\Datetime

Code

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