diff --git a/dask_kubernetes/common/auth.py b/dask_kubernetes/common/auth.py index 1a56bfe46..ee80ed113 100644 --- a/dask_kubernetes/common/auth.py +++ b/dask_kubernetes/common/auth.py @@ -162,7 +162,9 @@ async def refresh_oid_token(self): self.token_expire_ts <= datetime.datetime.now(tz=tzUTC) ): await self._refresh_oidc(provider) - expires = self.extract_oid_expiration_from_provider(provider=provider) + expires = datetime.datetime.fromtimestamp( + self.extract_oid_expiration_from_provider(provider=provider) + ) await self.create_refresh_task_from_expiration_timestamp( expiration_timestamp=expires