From 1db8b93cfa62b9df6622e053101e1ff44e568b83 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Fri, 8 Mar 2019 20:34:14 +0200 Subject: [PATCH] Request object: Include attribute for request time --- system/src/Grav/Common/Processors/RequestProcessor.php | 1 + 1 file changed, 1 insertion(+) diff --git a/system/src/Grav/Common/Processors/RequestProcessor.php b/system/src/Grav/Common/Processors/RequestProcessor.php index 2f2165450..f59b78aa3 100644 --- a/system/src/Grav/Common/Processors/RequestProcessor.php +++ b/system/src/Grav/Common/Processors/RequestProcessor.php @@ -25,6 +25,7 @@ class RequestProcessor extends ProcessorBase $this->startTimer(); $request = $request ->withAttribute('grav', $this->container) + ->withAttribute('time', $_SERVER['REQUEST_TIME_FLOAT'] ?? GRAV_REQUEST_TIME) ->withAttribute('route', Uri::getCurrentRoute()) ->withAttribute('referrer', $this->container['uri']->referrer());