REQUEST_TIME
Same name and namespace in other branches
- 8.9.x core/includes/bootstrap.inc \REQUEST_TIME
- 10 core/includes/bootstrap.inc \REQUEST_TIME
Time of the current request in seconds elapsed since the Unix Epoch.
This differs from $_SERVER['REQUEST_TIME'], which is stored as a float since PHP 5.4.0. Float timestamps confuse most PHP functions (including date_create()).
Deprecated
in drupal:8.3.0 and is removed from drupal:11.0.0. Use \Drupal::time()->getRequestTime();
See also
http://php.net/manual/reserved.variables.server.php
http://php.net/manual/function.time.php
https://www.drupal.org/node/2785211
1 use of REQUEST_TIME
- DateHelper::years in core/
lib/ Drupal/ Core/ Datetime/ DateHelper.php - Constructs an array of years in a specified range.
File
-
core/
includes/ bootstrap.inc, line 121
Code
define('REQUEST_TIME', (int) $_SERVER['REQUEST_TIME']);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.