diff --git a/core/lib/Drupal/Core/Cache/MemoryBackend.php b/core/lib/Drupal/Core/Cache/MemoryBackend.php
index c3fc789..26da770 100644
--- a/core/lib/Drupal/Core/Cache/MemoryBackend.php
+++ b/core/lib/Drupal/Core/Cache/MemoryBackend.php
@@ -94,7 +94,7 @@ protected function prepareItem($cache, $allow_invalid) {
     $prepared->data = unserialize($prepared->data);
 
     // Check expire time.
-    $prepared->valid = $prepared->expire == Cache::PERMANENT || $prepared->expire >= REQUEST_TIME;
+    $prepared->valid = $prepared->expire == Cache::PERMANENT || $prepared->expire >= $this->getRequestTime();
 
     if (!$allow_invalid && !$prepared->valid) {
       return FALSE;
@@ -114,7 +114,7 @@ public function set($cid, $data, $expire = Cache::PERMANENT, array $tags = array
     $this->cache[$cid] = (object) array(
       'cid' => $cid,
       'data' => serialize($data),
-      'created' => REQUEST_TIME,
+      'created' => $this->getRequestTime(),
       'expire' => $expire,
       'tags' => $tags,
     );
@@ -155,7 +155,7 @@ public function deleteAll() {
    */
   public function invalidate($cid) {
     if (isset($this->cache[$cid])) {
-      $this->cache[$cid]->expire = REQUEST_TIME - 1;
+      $this->cache[$cid]->expire = $this->getRequestTime() - 1;
     }
   }
 
@@ -164,7 +164,7 @@ public function invalidate($cid) {
    */
   public function invalidateMultiple(array $cids) {
     foreach ($cids as $cid) {
-      $this->cache[$cid]->expire = REQUEST_TIME - 1;
+      $this->cache[$cid]->expire = $this->getRequestTime() - 1;
     }
   }
 
@@ -174,7 +174,7 @@ public function invalidateMultiple(array $cids) {
   public function invalidateTags(array $tags) {
     foreach ($this->cache as $cid => $item) {
       if (array_intersect($tags, $item->tags)) {
-        $this->cache[$cid]->expire = REQUEST_TIME - 1;
+        $this->cache[$cid]->expire = $this->getRequestTime() - 1;
       }
     }
   }
@@ -184,7 +184,7 @@ public function invalidateTags(array $tags) {
    */
   public function invalidateAll() {
     foreach ($this->cache as $cid => $item) {
-      $this->cache[$cid]->expire = REQUEST_TIME - 1;
+      $this->cache[$cid]->expire = $this->getRequestTime() - 1;
     }
   }
 
@@ -202,6 +202,20 @@ public function removeBin() {
   }
 
   /**
+   * Wrapper method for REQUEST_TIME constant.
+   *
+   * @return int
+   */
+  protected function getRequestTime() {
+    if (defined('REQUEST_TIME')) {
+      return REQUEST_TIME;
+    }
+    else {
+      return (int) $_SERVER['REQUEST_TIME'];
+    }
+  }
+
+  /**
    * Prevents data stored in memory backends from being serialized.
    */
   public function __sleep() {
diff --git a/core/lib/Drupal/Core/Path/AliasManager.php b/core/lib/Drupal/Core/Path/AliasManager.php
index d91ad69..e86b4d0 100644
--- a/core/lib/Drupal/Core/Path/AliasManager.php
+++ b/core/lib/Drupal/Core/Path/AliasManager.php
@@ -144,7 +144,7 @@ public function writeCache() {
 
       if (!empty($path_lookups)) {
         $twenty_four_hours = 60 * 60 * 24;
-        $this->cache->set($this->cacheKey, $path_lookups, REQUEST_TIME + $twenty_four_hours);
+        $this->cache->set($this->cacheKey, $path_lookups, $this->getRequestTime() + $twenty_four_hours);
       }
     }
   }
@@ -286,4 +286,18 @@ protected function pathAliasWhitelistRebuild($path = NULL) {
     }
     $this->whitelist->clear();
   }
+
+  /**
+   * Wrapper method for REQUEST_TIME constant.
+   *
+   * @return int
+   */
+  protected function getRequestTime() {
+    if (defined('REQUEST_TIME')) {
+      return REQUEST_TIME;
+    }
+    else {
+      return (int) $_SERVER['REQUEST_TIME'];
+    }
+  }
 }
diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php
index b1d300e..da29cc4 100644
--- a/core/lib/Drupal/Core/Render/Renderer.php
+++ b/core/lib/Drupal/Core/Render/Renderer.php
@@ -546,7 +546,7 @@ protected function cacheSet(array &$elements, $pre_bubbling_cid) {
     $data = $this->getCacheableRenderArray($elements);
 
     $bin = isset($elements['#cache']['bin']) ? $elements['#cache']['bin'] : 'render';
-    $expire = ($elements['#cache']['max-age'] === Cache::PERMANENT) ? Cache::PERMANENT : REQUEST_TIME + $elements['#cache']['max-age'];
+    $expire = ($elements['#cache']['max-age'] === Cache::PERMANENT) ? Cache::PERMANENT : (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME') + $elements['#cache']['max-age'];
     $cache = $this->cacheFactory->get($bin);
 
     // Two-tier caching: detect different CID post-bubbling, create redirect,
diff --git a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php
index 2a700e9..f862ae8 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php
@@ -354,7 +354,7 @@ public function testTimeOptionExceeded() {
     $this->executable->setTimeElapsed(1);
     $this->assertTrue($this->executable->timeOptionExceeded());
     // Assert time limit not exceeded.
-    $this->executable->limit = array('unit' => 'seconds', 'value' => (REQUEST_TIME - 3600));
+    $this->executable->limit = array('unit' => 'seconds', 'value' => (int) $_SERVER['REQUEST_TIME'] - 3600);
     $this->assertFalse($this->executable->timeOptionExceeded());
     // Assert no time limit.
     $this->executable->limit = array();
diff --git a/core/modules/user/src/PrivateTempStore.php b/core/modules/user/src/PrivateTempStore.php
index 1fbf416..79be710 100644
--- a/core/modules/user/src/PrivateTempStore.php
+++ b/core/modules/user/src/PrivateTempStore.php
@@ -132,7 +132,7 @@ public function set($key, $value) {
     $value = (object) array(
       'owner' => $this->getOwner(),
       'data' => $value,
-      'updated' => REQUEST_TIME,
+      'updated' => (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME'),
     );
     $this->storage->setWithExpire($key, $value, $this->expire);
     $this->lockBackend->release($key);
diff --git a/core/modules/user/src/SharedTempStore.php b/core/modules/user/src/SharedTempStore.php
index 4dfc291..89c9725 100644
--- a/core/modules/user/src/SharedTempStore.php
+++ b/core/modules/user/src/SharedTempStore.php
@@ -10,6 +10,7 @@
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface;
 use Drupal\Core\Lock\LockBackendInterface;
+use Symfony\Component\HttpFoundation\RequestStack;
 
 /**
  * Stores and retrieves temporary data for a given owner.
@@ -57,6 +58,13 @@ class SharedTempStore {
   protected $lockBackend;
 
   /**
+   * The request stack.
+   *
+   * @var \Symfony\Component\HttpFoundation\RequestStack
+   */
+  protected $requestStack;
+
+  /**
    * The owner key to store along with the data (e.g. a user or session ID).
    *
    * @var mixed
@@ -83,13 +91,16 @@ class SharedTempStore {
    *   The lock object used for this data.
    * @param mixed $owner
    *   The owner key to store along with the data (e.g. a user or session ID).
+   * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
+   *   The request stack.
    * @param int $expire
    *   The time to live for items, in seconds.
    */
-  public function __construct(KeyValueStoreExpirableInterface $storage, LockBackendInterface $lockBackend, $owner, $expire = 604800) {
+  public function __construct(KeyValueStoreExpirableInterface $storage, LockBackendInterface $lockBackend, $owner, RequestStack $request_stack, $expire = 604800) {
     $this->storage = $storage;
     $this->lockBackend = $lockBackend;
     $this->owner = $owner;
+    $this->requestStack = $request_stack;
     $this->expire = $expire;
   }
 
@@ -140,7 +151,7 @@ public function setIfNotExists($key, $value) {
     $value = (object) array(
       'owner' => $this->owner,
       'data' => $value,
-      'updated' => REQUEST_TIME,
+      'updated' => (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME'),
     );
     return $this->storage->setWithExpireIfNotExists($key, $value, $this->expire);
   }
@@ -195,7 +206,7 @@ public function set($key, $value) {
     $value = (object) array(
       'owner' => $this->owner,
       'data' => $value,
-      'updated' => REQUEST_TIME,
+      'updated' => (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME'),
     );
     $this->storage->setWithExpire($key, $value, $this->expire);
     $this->lockBackend->release($key);
diff --git a/core/modules/user/src/SharedTempStoreFactory.php b/core/modules/user/src/SharedTempStoreFactory.php
index 3a18c4c..da2331d 100644
--- a/core/modules/user/src/SharedTempStoreFactory.php
+++ b/core/modules/user/src/SharedTempStoreFactory.php
@@ -10,6 +10,7 @@
 use Drupal\Component\Serialization\SerializationInterface;
 use Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface;
 use Drupal\Core\Lock\LockBackendInterface;
+use Symfony\Component\HttpFoundation\RequestStack;
 
 /**
  * Creates a shared temporary storage for a collection.
@@ -31,6 +32,13 @@ class SharedTempStoreFactory {
   protected $lockBackend;
 
   /**
+   * The request stack.
+   *
+   * @var \Symfony\Component\HttpFoundation\RequestStack
+   */
+  protected $requestStack;
+
+  /**
    * The time to live for items in seconds.
    *
    * @var int
@@ -44,12 +52,15 @@ class SharedTempStoreFactory {
    *   The connection object used for this data.
    * @param \Drupal\Core\Lock\LockBackendInterface $lockBackend
    *   The lock object used for this data.
+   * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
+   *   The request stack.
    * @param int $expire
    *   The time to live for items, in seconds.
    */
-  function __construct(KeyValueExpirableFactoryInterface $storage_factory, LockBackendInterface $lockBackend, $expire = 604800) {
+  function __construct(KeyValueExpirableFactoryInterface $storage_factory, LockBackendInterface $lockBackend, RequestStack $request_stack, $expire = 604800) {
     $this->storageFactory = $storage_factory;
     $this->lockBackend = $lockBackend;
+    $this->requestStack = $request_stack;
     $this->expire = $expire;
   }
 
@@ -76,7 +87,7 @@ function get($collection, $owner = NULL) {
 
     // Store the data for this collection in the database.
     $storage = $this->storageFactory->get("user.shared_tempstore.$collection");
-    return new SharedTempStore($storage, $this->lockBackend, $owner, $this->expire);
+    return new SharedTempStore($storage, $this->lockBackend, $owner, $this->requestStack, $this->expire);
   }
 
 }
diff --git a/core/modules/user/src/Tests/TempStoreDatabaseTest.php b/core/modules/user/src/Tests/TempStoreDatabaseTest.php
index b12cbf2..ffe85c4 100644
--- a/core/modules/user/src/Tests/TempStoreDatabaseTest.php
+++ b/core/modules/user/src/Tests/TempStoreDatabaseTest.php
@@ -76,7 +76,7 @@ protected function setUp() {
    */
   public function testUserTempStore() {
     // Create a key/value collection.
-    $factory = new SharedTempStoreFactory(new KeyValueExpirableFactory(\Drupal::getContainer()), new DatabaseLockBackend(Database::getConnection()));
+    $factory = new SharedTempStoreFactory(new KeyValueExpirableFactory(\Drupal::getContainer()), new DatabaseLockBackend(Database::getConnection()), $this->container->get('request_stack'));
     $collection = $this->randomMachineName();
 
     // Create two mock users.
diff --git a/core/modules/user/tests/src/Unit/PrivateTempStoreTest.php b/core/modules/user/tests/src/Unit/PrivateTempStoreTest.php
index 51a1b50..a2d3d95 100644
--- a/core/modules/user/tests/src/Unit/PrivateTempStoreTest.php
+++ b/core/modules/user/tests/src/Unit/PrivateTempStoreTest.php
@@ -9,6 +9,7 @@
 
 use Drupal\Tests\UnitTestCase;
 use Drupal\user\PrivateTempStore;
+use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\RequestStack;
 
 /**
@@ -80,13 +81,15 @@ protected function setUp() {
       ->willReturn(1);
 
     $this->requestStack = new RequestStack();
+    $request = Request::createFromGlobals();
+    $this->requestStack->push($request);
 
     $this->tempStore = new PrivateTempStore($this->keyValue, $this->lock, $this->currentUser, $this->requestStack, 604800);
 
     $this->ownObject = (object) array(
       'data' => 'test_data',
       'owner' => $this->currentUser->id(),
-      'updated' => REQUEST_TIME,
+      'updated' => (int) $request->server->get('REQUEST_TIME'),
     );
 
     // Clone the object but change the owner.
diff --git a/core/modules/user/tests/src/Unit/SharedTempStoreTest.php b/core/modules/user/tests/src/Unit/SharedTempStoreTest.php
index a402a06..effc4f9 100644
--- a/core/modules/user/tests/src/Unit/SharedTempStoreTest.php
+++ b/core/modules/user/tests/src/Unit/SharedTempStoreTest.php
@@ -9,6 +9,8 @@
 
 use Drupal\Tests\UnitTestCase;
 use Drupal\user\SharedTempStore;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\RequestStack;
 
 /**
  * @coversDefaultClass \Drupal\user\SharedTempStore
@@ -45,6 +47,13 @@ class SharedTempStoreTest extends UnitTestCase {
   protected $owner = 1;
 
   /**
+   * The request stack.
+   *
+   * @var \Symfony\Component\HttpFoundation\RequestStack
+   */
+  protected $requestStack;
+
+  /**
    * A tempstore object belonging to the owner.
    *
    * @var \stdClass
@@ -66,13 +75,16 @@ protected function setUp() {
 
     $this->keyValue = $this->getMock('Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface');
     $this->lock = $this->getMock('Drupal\Core\Lock\LockBackendInterface');
+    $this->requestStack = new RequestStack();
+    $request = Request::createFromGlobals();
+    $this->requestStack->push($request);
 
-    $this->tempStore = new SharedTempStore($this->keyValue, $this->lock, $this->owner, 604800);
+    $this->tempStore = new SharedTempStore($this->keyValue, $this->lock, $this->owner, $this->requestStack, 604800);
 
     $this->ownObject = (object) array(
       'data' => 'test_data',
       'owner' => $this->owner,
-      'updated' => REQUEST_TIME,
+      'updated' => (int) $request->server->get('REQUEST_TIME'),
     );
 
     // Clone the object but change the owner.
diff --git a/core/modules/user/user.services.yml b/core/modules/user/user.services.yml
index b520772..0cf12ef 100644
--- a/core/modules/user/user.services.yml
+++ b/core/modules/user/user.services.yml
@@ -50,7 +50,7 @@ services:
       - { name: backend_overridable }
   user.shared_tempstore:
     class: Drupal\user\SharedTempStoreFactory
-    arguments: ['@keyvalue.expirable', '@lock', '%user.tempstore.expire%']
+    arguments: ['@keyvalue.expirable', '@lock', '@request_stack', '%user.tempstore.expire%']
     tags:
       - { name: backend_overridable }
   user.permissions:
diff --git a/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php b/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php
index 273addd..cb26b58 100644
--- a/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php
+++ b/core/modules/views_ui/tests/src/Unit/ViewUIObjectTest.php
@@ -101,7 +101,7 @@ public function testIsLocked() {
     $lock = (object) array(
       'owner' => 2,
       'data' => array(),
-      'updated' => REQUEST_TIME,
+      'updated' => (int) $_SERVER['REQUEST_TIME'],
     );
     $view_ui->lock = $lock;
     $this->assertTrue($view_ui->isLocked());
@@ -110,7 +110,7 @@ public function testIsLocked() {
     $lock = (object) array(
       'owner' => 1,
       'data' => array(),
-      'updated' => REQUEST_TIME,
+      'updated' => (int) $_SERVER['REQUEST_TIME'],
     );
     $view_ui->lock = $lock;
     $this->assertFalse($view_ui->isLocked());
diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php
index 7e91fcb..7e98390 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php
@@ -121,7 +121,7 @@ public function testGetFromCache() {
 
     $cache = (object) array(
       'data' => array($key => $value),
-      'created' => REQUEST_TIME,
+      'created' => (int) $_SERVER['REQUEST_TIME'],
     );
     $this->cacheBackend->expects($this->once())
       ->method('get')
@@ -229,7 +229,7 @@ public function testUpdateCacheInvalidatedConflict() {
 
     $cache = (object) array(
       'data' => array($key => $value),
-      'created' => REQUEST_TIME,
+      'created' => (int) $_SERVER['REQUEST_TIME'],
     );
     $this->cacheBackend->expects($this->at(0))
       ->method('get')
@@ -250,7 +250,7 @@ public function testUpdateCacheInvalidatedConflict() {
       ->will($this->returnValue(TRUE));
     $cache = (object) array(
       'data' => array($key => $value),
-      'created' => REQUEST_TIME + 1,
+      'created' => (int) $_SERVER['REQUEST_TIME'] + 1,
     );
     $this->cacheBackend->expects($this->at(0))
       ->method('get')
@@ -286,7 +286,7 @@ public function testUpdateCacheMerge() {
       ->will($this->returnValue(TRUE));
     $cache = (object) array(
       'data' => array('other key' => 'other value'),
-      'created' => REQUEST_TIME + 1,
+      'created' => (int) $_SERVER['REQUEST_TIME'] + 1,
     );
     $this->cacheBackend->expects($this->at(0))
       ->method('get')
@@ -312,7 +312,7 @@ public function testUpdateCacheDelete() {
 
     $cache = (object) array(
       'data' => array($key => $value),
-      'created' => REQUEST_TIME,
+      'created' => (int) $_SERVER['REQUEST_TIME'],
     );
     $this->cacheBackend->expects($this->at(0))
       ->method('get')
diff --git a/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendTest.php b/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendTest.php
index c2640f2..11e1600 100644
--- a/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/ChainedFastBackendTest.php
@@ -44,8 +44,8 @@ class ChainedFastBackendTest extends UnitTestCase {
   public function testGetDoesntHitConsistentBackend() {
     $consistent_cache = $this->getMock('Drupal\Core\Cache\CacheBackendInterface');
     $timestamp_cid = ChainedFastBackend::LAST_WRITE_TIMESTAMP_PREFIX . 'cache_foo';
-    // Use REQUEST_TIME because that is what we will be comparing against.
-    $timestamp_item = (object) array('cid' => $timestamp_cid, 'data' => REQUEST_TIME - 60);
+    // Use the request time because that is what we will be comparing against.
+    $timestamp_item = (object) array('cid' => $timestamp_cid, 'data' => (int) $_SERVER['REQUEST_TIME'] - 60);
     $consistent_cache->expects($this->once())
       ->method('get')->with($timestamp_cid)
       ->will($this->returnValue($timestamp_item));
diff --git a/core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php b/core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php
index 2b731cf..67bfed0 100644
--- a/core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php
@@ -207,7 +207,7 @@ public function testGetAliasByPathNoMatch() {
     // This needs to write out the cache.
     $this->cache->expects($this->once())
       ->method('set')
-      ->with($this->cacheKey, array($language->getId() => array($path)), REQUEST_TIME + (60 * 60 * 24));
+      ->with($this->cacheKey, array($language->getId() => array($path)), (int) $_SERVER['REQUEST_TIME'] + (60 * 60 * 24));
 
     $this->aliasManager->writeCache();
   }
@@ -245,7 +245,7 @@ public function testGetAliasByPathMatch() {
     // This needs to write out the cache.
     $this->cache->expects($this->once())
       ->method('set')
-      ->with($this->cacheKey, array($language->getId() => array($path)), REQUEST_TIME + (60 * 60 * 24));
+      ->with($this->cacheKey, array($language->getId() => array($path)), (int) $_SERVER['REQUEST_TIME'] + (60 * 60 * 24));
 
     $this->aliasManager->writeCache();
   }
@@ -346,7 +346,7 @@ public function testGetAliasByPathCachedMissLanguage() {
     );
     $this->cache->expects($this->once())
       ->method('set')
-      ->with($this->cacheKey, $expected_new_cache, REQUEST_TIME + (60 * 60 * 24));
+      ->with($this->cacheKey, $expected_new_cache, (int) $_SERVER['REQUEST_TIME'] + (60 * 60 * 24));
     $this->aliasManager->writeCache();
   }
 
@@ -447,7 +447,7 @@ public function testGetAliasByPathUncachedMissNoAlias() {
     );
     $this->cache->expects($this->once())
       ->method('set')
-      ->with($this->cacheKey, $expected_new_cache, REQUEST_TIME + (60 * 60 * 24));
+      ->with($this->cacheKey, $expected_new_cache, (int) $_SERVER['REQUEST_TIME'] + (60 * 60 * 24));
     $this->aliasManager->writeCache();
   }
 
@@ -539,7 +539,7 @@ public function testGetAliasByPathUncachedMissWithAlias() {
     );
     $this->cache->expects($this->once())
       ->method('set')
-      ->with($this->cacheKey, $expected_new_cache, REQUEST_TIME + (60 * 60 * 24));
+      ->with($this->cacheKey, $expected_new_cache, (int) $_SERVER['REQUEST_TIME'] + (60 * 60 * 24));
     $this->aliasManager->writeCache();
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTest.php b/core/tests/Drupal/Tests/Core/Render/RendererTest.php
index 36cc3bc..27f1822 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererTest.php
@@ -612,7 +612,7 @@ public function testRenderCacheMaxAge($max_age, $is_render_cached, $render_cache
   public function providerTestRenderCacheMaxAge() {
     return [
       [0, FALSE, NULL],
-      [60, TRUE, REQUEST_TIME + 60],
+      [60, TRUE, (int) $_SERVER['REQUEST_TIME'] + 60],
       [Cache::PERMANENT, TRUE, -1],
     ];
   }
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
index 15a3b05..3e24b59 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
@@ -138,6 +138,8 @@ protected function setupMemoryCache() {
    */
   protected function setUpRequest($method = 'GET') {
     $request = Request::create('/', $method);
+    // Ensure that the request time is set as expected.
+    $request->server->set('REQUEST_TIME', (int) $_SERVER['REQUEST_TIME']);
     $this->requestStack->push($request);
   }
 
diff --git a/core/tests/bootstrap.php b/core/tests/bootstrap.php
index d0512e1..fd980a4 100644
--- a/core/tests/bootstrap.php
+++ b/core/tests/bootstrap.php
@@ -81,9 +81,6 @@ function drupal_phpunit_register_extension_dirs(Composer\Autoload\ClassLoader $l
 $dirs = array_reduce($dirs, 'array_merge', array());
 drupal_phpunit_register_extension_dirs($loader, $dirs);
 
-// Look into removing these later.
-define('REQUEST_TIME', (int) $_SERVER['REQUEST_TIME']);
-
 // Set sane locale settings, to ensure consistent string, dates, times and
 // numbers handling.
 // @see \Drupal\Core\DrupalKernel::bootEnvironment()
