Skip to content
Snippets Groups Projects
Commit 97c83c4f authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #1289208 by minorOffense, skottler, rocket_nova: REQUEST_TIME documentation is misleading.

parent 77006b27
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -198,10 +198,14 @@ ...@@ -198,10 +198,14 @@
define('LANGUAGE_RTL', 1); define('LANGUAGE_RTL', 1);
/** /**
* For convenience, define a short form of the request time global. * Time of the current request in seconds elapsed since the Unix Epoch.
* *
* REQUEST_TIME is a float with microseconds since PHP 5.4.0, but float * This differs from $_SERVER['REQUEST_TIME'], which is stored as a float
* timestamps confuses most of the PHP functions (including date_create()). * since PHP 5.4.0. Float timestamps confuse most PHP functions
* (including date_create()).
*
* @see http://php.net/manual/reserved.variables.server.php
* @see http://php.net/manual/function.time.php
*/ */
define('REQUEST_TIME', (int) $_SERVER['REQUEST_TIME']); define('REQUEST_TIME', (int) $_SERVER['REQUEST_TIME']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment