fix: ensure more date iso string are converted to Date
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStation.ts
index 9efe7b3087fac1a46136255fe050e88966ba00a0..92fbb80c6e21bde391c74ffccdd52100a38bd26a 100644 (file)
@@ -134,6 +134,7 @@ import {
   buildUpdatedMessage,
   cloneObject,
   convertToBoolean,
+  convertToDate,
   convertToInt,
   exponentialDelay,
   formatDurationMilliSeconds,
@@ -1776,6 +1777,10 @@ export class ChargingStation extends EventEmitter {
           >(this, RequestCommand.BOOT_NOTIFICATION, this.bootNotificationRequest, {
             skipBufferingOnError: true
           })
+          // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+          this.bootNotificationResponse.currentTime = convertToDate(
+            this.bootNotificationResponse.currentTime
+          )!
           if (!this.isRegistered()) {
             this.stationInfo?.registrationMaxRetries !== -1 && ++registrationRetryCount
             await sleep(