From 0285aaa4b9fc211c2901147c3ba5e20a08131b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Pailharey?= <rpailharey@grandlyon.com> Date: Thu, 30 Nov 2023 10:15:04 +0100 Subject: [PATCH] fix(fluidsPrices): correct argument for DateTime --- src/targets/services/fluidsPrices.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/targets/services/fluidsPrices.ts b/src/targets/services/fluidsPrices.ts index cd71bf29c..32ad62df0 100644 --- a/src/targets/services/fluidsPrices.ts +++ b/src/targets/services/fluidsPrices.ts @@ -140,7 +140,11 @@ const aggregatePrices = async ( `Aggregation started for fluid: ${fluidType}, from ${firstDate} ` ) for (const timeStep of timeSteps) { - let aggregationDate = DateTime.fromObject(firstDate) + let aggregationDate = DateTime.fromObject({ + year: firstDate.year, + month: firstDate.month, + day: firstDate.day, + }) try { do { const timePeriod = await getTimePeriod(timeStep, aggregationDate) -- GitLab