diff --git a/flag.services.yml b/flag.services.yml
index 273fb9a..3df4527 100644
--- a/flag.services.yml
+++ b/flag.services.yml
@@ -20,7 +20,7 @@ services:
     arguments: ['@current_user', '@entity_type.manager', '@session_manager']
   flag.count:
     class: Drupal\flag\FlagCountManager
-    arguments: ['@database']
+    arguments: ['@database', '@datetime.time']
     tags:
       - { name: event_subscriber }
   flag.link_builder:
diff --git a/src/FlagCountManager.php b/src/FlagCountManager.php
index e14a9b2..c2fa819 100644
--- a/src/FlagCountManager.php
+++ b/src/FlagCountManager.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\flag;
 
+use Drupal\Component\Datetime\TimeInterface;
 use Drupal\Core\Database\Connection;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Session\AccountInterface;
@@ -51,10 +52,28 @@ class FlagCountManager implements FlagCountManagerInterface, EventSubscriberInte
   protected $connection;
 
   /**
+   * The date time service.
+   *
+   * @var \Drupal\Component\Datetime\TimeInterface
+   */
+  protected $dateTime;
+
+  /**
    * Constructs a FlagCountManager.
    */
-  public function __construct(Connection $connection) {
+  public function __construct(Connection $connection, TimeInterface $date_time) {
     $this->connection = $connection;
+    $this->dateTime = $date_time;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container) {
+    return new self (
+      $container->get('database'),
+      $container->get('datetime.time')
+    );
   }
 
   /**
@@ -184,7 +203,7 @@ class FlagCountManager implements FlagCountManagerInterface, EventSubscriberInte
         'entity_type' => $entity->getEntityTypeId(),
       ])
       ->fields([
-        'last_updated' => REQUEST_TIME,
+        'last_updated' => $this->dateTime->getRequestTime(),
         'count' => 1,
       ])
       ->expression('count', 'count + :inc', [':inc' => 1])
