From 12816cc143d75757c17146bed256946a535dfdf0 Mon Sep 17 00:00:00 2001 From: droctothorpe Date: Thu, 10 Aug 2023 10:32:00 -0400 Subject: [PATCH] Convert oid expiration timestamp to datetime.datetime Co-authored-by: DWSR Co-authored-by: harrisonfritz --- dask_kubernetes/common/auth.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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