meterStart: chargingStation.getEnergyActiveImportRegisterByConnectorId(
commandParams?.connectorId as number
),
- timestamp: new Date(),
+ timestamp: commandParams?.timestamp ?? new Date(),
} as unknown as Request;
case OCPP16RequestCommand.STOP_TRANSACTION:
connectorId = chargingStation.getConnectorIdByTransactionId(
commandParams?.idTag ??
chargingStation.getTransactionIdTag(commandParams?.transactionId as number),
meterStop: commandParams?.meterStop ?? energyActiveImportRegister,
- timestamp: new Date(),
+ timestamp: commandParams?.timestamp ?? new Date(),
reason: commandParams?.reason,
...(chargingStation.getTransactionDataMeterValues() && {
transactionData: OCPP16ServiceUtils.buildTransactionDataMeterValues(
return {} as unknown as Request;
case OCPP20RequestCommand.STATUS_NOTIFICATION:
return {
- timestamp: commandParams?.timestamp,
+ timestamp: commandParams?.timestamp ?? new Date(),
connectorStatus: commandParams?.connectorStatus,
evseId: commandParams?.evseId,
connectorId: commandParams?.connectorId,