Skip to content

Commit

Permalink
use tz
Browse files Browse the repository at this point in the history
  • Loading branch information
unsync committed Jan 26, 2024
1 parent fe7d5af commit 81664dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/veolia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ export class VeoliaClient {
}

return soapBody.map((r: any) => {
this.logger.info(`VeoliaClient > getEnergyData > ${dayjs(r.dateReleve).toISOString()}: ${r.consommation}`)
this.logger.info(`VeoliaClient > getEnergyData > ${dayjs.tz(r.dateReleve).toISOString()}: ${r.consommation}`)
return {
start: dayjs(r.dateReleve).add(6, 'hour').set('hour', 0).add(12, 'hour').toISOString(),
start: dayjs.tz(r.dateReleve).add(6, 'hour').set('hour', 0).add(12, 'hour').toISOString(),
state: r.consommation,
// veolia set the index to the start of the day,
// so we need to add the consumption to get the end of the day index
Expand Down

0 comments on commit 81664dd

Please sign in to comment.