From c0098e19b37c842c2e0b2c67dab19d7fa4bb2224 Mon Sep 17 00:00:00 2001 From: Natan Lao Date: Wed, 18 Nov 2020 11:53:47 -0800 Subject: [PATCH] Aggregate AWS costs on start date instead of end date (#30) --- report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/report.py b/report.py index dff1abe..0a44227 100644 --- a/report.py +++ b/report.py @@ -167,7 +167,7 @@ def generate_report(self) -> str: account = self.accounts.get(row['lineItem/UsageAccountId'], '(unknown)') service = row['product/ProductName'] amount = Decimal(row['lineItem/BlendedCost']) - when = row['lineItem/UsageEndDate'][0:10] # ISO8601 + when = row['lineItem/UsageStartDate'][0:10] # ISO8601 if when == today: service_by_account_today[account][service] += amount