summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
497588e)
time windows
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
chargingSchedule.startSchedule,
differenceInDays(chargingSchedule.startSchedule, endOfDay(currentDate)),
);
chargingSchedule.startSchedule,
differenceInDays(chargingSchedule.startSchedule, endOfDay(currentDate)),
);
+ if (
+ isBefore(chargingSchedule.startSchedule, startOfDay(currentDate)) ||
+ isAfter(chargingSchedule.startSchedule, endOfDay(currentDate))
+ ) {
+ logger.error(
+ `${logPrefix} ${moduleName}.getLimitFromChargingProfiles: Recurring charging profile id ${
+ chargingProfile.chargingProfileId
+ } startSchedule ${chargingSchedule.startSchedule.toISOString()} is not properly translated to the current day`,
+ );
+ }
}
break;
case RecurrencyKindType.WEEKLY:
}
break;
case RecurrencyKindType.WEEKLY:
chargingSchedule.startSchedule,
differenceInWeeks(chargingSchedule.startSchedule, endOfWeek(currentDate)),
);
chargingSchedule.startSchedule,
differenceInWeeks(chargingSchedule.startSchedule, endOfWeek(currentDate)),
);
+ if (
+ isBefore(chargingSchedule.startSchedule, startOfWeek(currentDate)) ||
+ isAfter(chargingSchedule.startSchedule, endOfWeek(currentDate))
+ ) {
+ logger.error(
+ `${logPrefix} ${moduleName}.getLimitFromChargingProfiles: Recurring charging profile id ${
+ chargingProfile.chargingProfileId
+ } startSchedule ${chargingSchedule.startSchedule.toISOString()} is not properly translated to the current week`,
+ );
+ }