function Time::getCurrentTime

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/Datetime/Time.php \Drupal\Component\Datetime\Time::getCurrentTime()
  2. 8.9.x core/lib/Drupal/Component/Datetime/Time.php \Drupal\Component\Datetime\Time::getCurrentTime()
  3. 10 core/lib/Drupal/Component/Datetime/Time.php \Drupal\Component\Datetime\Time::getCurrentTime()

Overrides TimeInterface::getCurrentTime

File

core/lib/Drupal/Component/Datetime/Time.php, line 67

Class

Time
Provides a class for obtaining system time.

Namespace

Drupal\Component\Datetime

Code

public function getCurrentTime() {
    return time();
}

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