]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
refactor(auth): rename parsed to expiry in updateCacheEntry
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 31 Mar 2026 20:09:33 +0000 (22:09 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 31 Mar 2026 20:09:33 +0000 (22:09 +0200)
src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts

index 93f3549760858797d0c4d00eb659fee87b7d7a53..483e331ac12fce9766ead0b4b0301f4e0e124c30 100644 (file)
@@ -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)}`