diff --git a/tests/Authentication/Authenticators/AccessTokenAuthenticatorTest.php b/tests/Authentication/Authenticators/AccessTokenAuthenticatorTest.php index d84e66586..c5042dbb8 100644 --- a/tests/Authentication/Authenticators/AccessTokenAuthenticatorTest.php +++ b/tests/Authentication/Authenticators/AccessTokenAuthenticatorTest.php @@ -126,9 +126,11 @@ public function testCheckOldToken(): void /** @var User $user */ $user = fake(UserModel::class); /** @var UserIdentityModel $identities */ - $identities = model(UserIdentityModel::class); - $token = $user->generateAccessToken('foo'); - $token->last_used_at = Time::now()->subYears(1)->subMinutes(1); + $identities = model(UserIdentityModel::class); + $token = $user->generateAccessToken('foo'); + // CI 4.2 uses the Chicago timezone that has Daylight Saving Time, + // so subtracts 1 hour to make sure this test passes. + $token->last_used_at = Time::now()->subYears(1)->subHours(1)->subMinutes(1); $identities->save($token); $result = $this->auth->check(['token' => $token->raw_token]);