From f79412a3f7c37d59fc8f561aef8e9c309e5c8291 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 31 Mar 2026 22:09:33 +0200 Subject: [PATCH] refactor(auth): rename parsed to expiry in updateCacheEntry --- .../ocpp/auth/services/OCPPAuthServiceImpl.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts b/src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts index 93f35497..483e331a 100644 --- a/src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts +++ b/src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts @@ -561,9 +561,9 @@ export class OCPPAuthServiceImpl implements OCPPAuthService { let ttl: number | undefined if (expiryDate != null) { - const parsed = convertToDate(expiryDate) - if (parsed != null) { - const ttlSeconds = Math.ceil((parsed.getTime() - Date.now()) / 1000) + const expiry = convertToDate(expiryDate) + if (expiry != null) { + const ttlSeconds = Math.ceil((expiry.getTime() - Date.now()) / 1000) if (ttlSeconds <= 0) { logger.debug( `${this.chargingStation.logPrefix()} ${moduleName}.updateCacheEntry: Skipping expired entry for ${truncateId(identifier)}` -- 2.43.0