From 1b38b941532da3136701322b51ce58a771fb95db Mon Sep 17 00:00:00 2001 From: git-directory-deploy <> Date: Wed, 16 Dec 2020 15:29:01 +0100 Subject: [PATCH] publish: feat: handle the date for history generated from commit 5dcbe37f4618c76e3d6af39be19354eba67f629e --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index fde2f4b..d596617 100644 --- a/index.js +++ b/index.js @@ -237,12 +237,12 @@ async function startLoadDataProcess(token, usagePointID) { log('info', 'launch process with history') for (var i = 0; i < 4; i++) { log('info', 'LOGGGGGG i ' + i) - const increamentedStartDate = startLoadDate - const incrementedEndDate = endDate + const increamentedStartDate = moment(startLoadDate) + const incrementedEndDate = moment(endDate) log('info', 'LOGGGGGG startLoadDate ' + startLoadDate.format('YYYY-MM-DD')) log('info', 'LOGGGGGG endDate ' + endDate.format('YYYY-MM-DD')) log('info', 'LOGGGGGG increamentedStartDate ' + increamentedStartDate.format('YYYY-MM-DD')) - log('info', 'LOGGGGGG increamentedStartDate ' + increamentedStartDate.format('YYYY-MM-DD')) + log('info', 'LOGGGGGG incrementedEndDate ' + incrementedEndDate.format('YYYY-MM-DD')) const increamentedStartDateString = increamentedStartDate.subtract(7 * i, 'day').format('YYYY-MM-DD') const incrementedEndDateString = incrementedEndDate.subtract(7 * i, 'day').format('YYYY-MM-DD') log('info', 'LOGGGGGG increamentedStartDateString ' + increamentedStartDateString) -- GitLab