Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
unsync committed Jan 26, 2024
1 parent 5cb733b commit f4a0686
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/veolia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ export class VeoliaClient {
}

return soapBody.map((r: any) => {
this.logger.info(`VeoliaClient > getEnergyData`, {
dateReleve: r.dateReleve,
dateReleveFormatted: dayjs(r.dateReleve).format('YYYY-MM-DD'),
dateReleveFormattedIso: dayjs(dayjs(r.dateReleve).format('YYYY-MM-DD')).toISOString(),
now: dayjs().toISOString(),
dateReleve1: dayjs(r.dateReleve).toISOString(),
dateReleve2: dayjs(r.dateReleve).utc().toISOString(),
consommation: r.consommation,
index: r.index,
})

const dateReleveLocal = dayjs(r.dateReleve).hour(0)
const dateReleveUTC = dateReleveLocal.add(dateReleveLocal.utcOffset(), 'minute').utc()
this.logger.info(`VeoliaClient > getEnergyData > ${dateReleveUTC.toISOString()}: ${r.consommation}`)
Expand Down

0 comments on commit f4a0686

Please sign in to comment.