function Drupal::time

Returns the time service.

Return value

\Drupal\Component\Datetime\TimeInterface The time service.

File

core/lib/Drupal.php, line 775

Class

Drupal
Static Service Container wrapper.

Code

public static function time() {
  return static::getContainer()->get('datetime.time');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.