Remove now useless Date conversions to string
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 6 Jan 2023 22:09:08 +0000 (23:09 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 6 Jan 2023 22:09:08 +0000 (23:09 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/1.6/OCPP16RequestService.ts

index cf5ff237cb2e24b93dcbe5e1258ef2cd71862ae1..f28f5f9476502ecfd58736d58a6a5083c4b9185d 100644 (file)
@@ -251,7 +251,7 @@ export default class OCPP16RequestService extends OCPPRequestService {
           meterStart: chargingStation.getEnergyActiveImportRegisterByConnectorId(
             commandParams?.connectorId as number
           ),
-          timestamp: new Date().toISOString(),
+          timestamp: new Date(),
         } as unknown as Request;
       case OCPP16RequestCommand.STOP_TRANSACTION:
         connectorId = chargingStation.getConnectorIdByTransactionId(
@@ -269,7 +269,7 @@ export default class OCPP16RequestService extends OCPPRequestService {
             commandParams?.idTag ??
             chargingStation.getTransactionIdTag(commandParams?.transactionId as number),
           meterStop: commandParams?.meterStop ?? energyActiveImportRegister,
-          timestamp: new Date().toISOString(),
+          timestamp: new Date(),
           reason: commandParams?.reason,
           ...(chargingStation.getTransactionDataMeterValues() && {
             transactionData: OCPP16ServiceUtils.buildTransactionDataMeterValues(