1. 8.5.x core/includes/bootstrap.inc REQUEST_TIME
  2. 8.0.x core/includes/bootstrap.inc REQUEST_TIME
  3. 8.1.x core/includes/bootstrap.inc REQUEST_TIME
  4. 8.2.x core/includes/bootstrap.inc REQUEST_TIME
  5. 8.3.x core/includes/bootstrap.inc REQUEST_TIME
  6. 8.4.x core/includes/bootstrap.inc REQUEST_TIME
  7. 8.6.x core/includes/bootstrap.inc REQUEST_TIME
  8. 7.x 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, will be removed before Drupal 9.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

139 uses of REQUEST_TIME
AggregatorController::adminOverview in core/modules/aggregator/src/Controller/AggregatorController.php
Displays the aggregator administration page.
aggregator_cron in core/modules/aggregator/aggregator.module
Implements hook_cron().
AliasManager::getRequestTime in core/lib/Drupal/Core/Path/AliasManager.php
Wrapper method for REQUEST_TIME constant.
ApcuBackend::invalidateAll in core/lib/Drupal/Core/Cache/ApcuBackend.php
Marks all cache items as invalid.
ApcuBackend::invalidateMultiple in core/lib/Drupal/Core/Cache/ApcuBackend.php
Marks cache items as invalid.

... See full list

File

core/includes/bootstrap.inc, line 98
Functions that need to be loaded on every Drupal request.

Code

define('REQUEST_TIME', (int) $_SERVER['REQUEST_TIME']);