Skip to content

Commit

Permalink
Aggregate AWS costs on start date instead of end date (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
natanlao committed Nov 18, 2020
1 parent 6f583c7 commit c0098e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c0098e1

Please sign in to comment.