From: Jérôme Benoit Date: Tue, 31 Mar 2026 20:09:33 +0000 (+0200) Subject: refactor(auth): rename parsed to expiry in updateCacheEntry X-Git-Tag: ocpp-server@v4.1.0~6 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f79412a3f7c37d59fc8f561aef8e9c309e5c8291;p=e-mobility-charging-stations-simulator.git refactor(auth): rename parsed to expiry in updateCacheEntry --- 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)}`