Fix Agile rates during summer time

This commit is contained in:
Stephen Newey
2019-06-10 16:08:43 +01:00
parent d5963079cc
commit d91deaa1e0
2 changed files with 2 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
FROM python:3.6 FROM python:3.7
LABEL maintainer="Stephen Newey <github@s-n.me>" LABEL maintainer="Stephen Newey <github@s-n.me>"

View File

@@ -79,7 +79,7 @@ def store_series(connection, series, metrics, rate_data):
if agile_data: if agile_data:
agile_standing_charge = rate_data['agile_standing_charge'] / 48 agile_standing_charge = rate_data['agile_standing_charge'] / 48
agile_unit_rate = agile_rates.get( agile_unit_rate = agile_rates.get(
measurement['interval_end'], maya.parse(measurement['interval_end']).iso8601(),
rate_data[rate] # cludge, use Go rate during DST changeover rate_data[rate] # cludge, use Go rate during DST changeover
) )
agile_cost = agile_unit_rate * consumption agile_cost = agile_unit_rate * consumption