diff --git a/src/VoteResultFunctionManager.php b/src/VoteResultFunctionManager.php
index 084a79d..b0c6426 100644
--- a/src/VoteResultFunctionManager.php
+++ b/src/VoteResultFunctionManager.php
@@ -139,8 +139,8 @@ class VoteResultFunctionManager extends DefaultPluginManager {
         'type' => $vote_type,
         'function' => $plugin_id,
         'value' => $plugin->calculateResult($votes),
-        'timestamp' => REQUEST_TIME,
+        'timestamp' => \Drupal::time()->getRequestTime(),
       ))->execute();
     }
   }
-}
\ No newline at end of file
+}
diff --git a/votingapi.drush.inc b/votingapi.drush.inc
index 800fa98..46f1e20 100644
--- a/votingapi.drush.inc
+++ b/votingapi.drush.inc
@@ -118,6 +118,7 @@ function _votingapi_cast_votes($etype, $eid, $timestamp = 0, $uids = array(), $s
   if (!isset($tags)) {
     $tags = explode(' ', devel_create_greeking(30));
   }
+  $request_time = \Drupal::time()->getRequestTime();
   foreach ($uids as $uid) {
     switch ($style) {
       case 'percent':
@@ -126,7 +127,7 @@ function _votingapi_cast_votes($etype, $eid, $timestamp = 0, $uids = array(), $s
           'entity_type' => $etype,
           'entity_id' => $eid,
           'value_type' => 'percent',
-          'timestamp' => REQUEST_TIME - mt_rand(0, $timestamp),
+          'timestamp' => $request_time - mt_rand(0, $timestamp),
           'value' => mt_rand(1, 5) * 20,
           'tag' => $tags[mt_rand(0, 30)],
         );
@@ -138,7 +139,7 @@ function _votingapi_cast_votes($etype, $eid, $timestamp = 0, $uids = array(), $s
             'entity_type' => $etype,
             'entity_id' => $eid,
             'value_type' => 'points',
-            'timestamp' => REQUEST_TIME - mt_rand(0, $timestamp),
+            'timestamp' => $request_time - mt_rand(0, $timestamp),
             'value' => rand(0, 1) ? 1 : -1,
           );
         }
diff --git a/votingapi.module b/votingapi.module
index ce74b03..be8d571 100644
--- a/votingapi.module
+++ b/votingapi.module
@@ -67,6 +67,6 @@ function votingapi_cron() {
         $entity['type']
       );
     }
-    Drupal::state()->set('votingapi.last_cron', REQUEST_TIME);
+    Drupal::state()->set('votingapi.last_cron', \Drupal::time()->getRequestTime());
   }
 }
\ No newline at end of file
