fix: ensure more date iso string are converted to Date
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 13 Jan 2024 10:34:00 +0000 (11:34 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 13 Jan 2024 10:34:00 +0000 (11:34 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts

index 51cbbd168699708acc6903565f9698bd42863a30..bd96c4b3fab81d8c4fc10e79b979774a9309d9fd 100644 (file)
@@ -165,6 +165,8 @@ export class OCPP16ServiceUtils extends OCPPServiceUtils {
       chargingStation.getConnectorStatus(connectorId)!.chargingProfiles = []
     }
     // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+    cp.chargingSchedule.startSchedule = convertToDate(cp.chargingSchedule.startSchedule)!
+    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
     cp.validFrom = convertToDate(cp.validFrom)!
     // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
     cp.validTo = convertToDate(cp.validTo)!