diff --git a/src/Tests/SchedulerFunctionalTest.php b/src/Tests/SchedulerFunctionalTest.php
index c4ec281..94ee23b 100644
--- a/src/Tests/SchedulerFunctionalTest.php
+++ b/src/Tests/SchedulerFunctionalTest.php
@@ -63,6 +63,12 @@ class SchedulerFunctionalTest extends SchedulerTestBase {
    * Tests basic scheduling of content.
    */
   public function testScheduler() {
+    // Login to admin user. This is required here before creating the publish_on
+    // date and time values so that date.formatter can utilise the current users
+    // timezone. The constraints receive values which have been converted using
+    // the users timezone so they need to be consistent.
+    $this->drupalLogin($this->adminUser);
+
     // Create node values. Set time to one hour in the future.
     $edit = [
       'title[0][value]' => $this->randomMachineName(10),
