W3cubDocs

/Drupal 8

constant 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()).

See also

http://php.net/manual/reserved.variables.server.php

http://php.net/manual/function.time.php

File

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

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!bootstrap.inc/constant/REQUEST_TIME/8.1.x