Skip to content

Commit

Permalink
Merge pull request #147 from cdolghier/fix_history_fetching_offset
Browse files Browse the repository at this point in the history
Fix --resetdatabase
  • Loading branch information
jertel authored Jan 8, 2024
2 parents 601ea9d + 0f0c8fe commit 99857ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- Added `timezone` config to allow configuring the timezone according to which end-of-day is calculated.

## Other changes
- TBD
- Fixed `--resetdatabase` (broken in 1.6.1)

# 1.6.1

Expand Down
2 changes: 1 addition & 1 deletion src/vuegraf/vuegraf.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def extractDataPoints(device, usageDataPoints, pointType=None, historyStartTime=
info('Resetting database')
delete_api = influx2.delete_api()
start = '1970-01-01T00:00:00Z'
stop = startupTime.isoformat(timespec='seconds') + 'Z'
stop = startupTime.isoformat(timespec='seconds').replace("+00:00", "") + 'Z'
delete_api.delete(start, stop, '_measurement="energy_usage"', bucket=bucket, org=org)
else:
info('Using InfluxDB version 1')
Expand Down

0 comments on commit 99857ab

Please sign in to comment.