From ca6b4e49b5ff214299d45a94640e7f41aa0a33b5 Mon Sep 17 00:00:00 2001
From: git-directory-deploy <>
Date: Wed, 2 Mar 2022 14:17:37 +0100
Subject: [PATCH] correct month

---
 src/targets/services/consumptionAlert.ts | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/targets/services/consumptionAlert.ts b/src/targets/services/consumptionAlert.ts
index 708ff64ec..890094a4f 100644
--- a/src/targets/services/consumptionAlert.ts
+++ b/src/targets/services/consumptionAlert.ts
@@ -77,12 +77,8 @@ const consumptionAlert = async ({ client }: ConsumptionAlertProps) => {
     return
   }
 
-  log('info', 'VALUE', lastDayValue)
-  log('info', 'ALERT DAY', alertDay.day)
   log('info', 'Creation of mail...')
   const mailService = new MailService()
-  const today = DateTime.local().setZone('utc', { keepLocalTime: true })
-  log('info', 'TODAY', today.day)
 
   const environmentService = new EnvironmentService()
   const template = consumptionLimit({
@@ -92,7 +88,7 @@ const consumptionAlert = async ({ client }: ConsumptionAlertProps) => {
     clientUrl: `${appLink}/#/consumption/water`,
     unsubscribeUrl: `${appLink}/#/options`,
     userLimit: userProfil.waterDailyConsumptionLimit,
-    limitDate: `${alertDay.day} ${getPreviousMonthName(today)}`,
+    limitDate: `${alertDay.day} ${getPreviousMonthName(alertDay)}`,
   })
 
   const mailData = {
-- 
GitLab