From 6447a9efad6b3feff8fe2b91e150f32e85dd19d6 Mon Sep 17 00:00:00 2001 From: Ian Dees Date: Tue, 2 Mar 2021 23:59:08 -0600 Subject: [PATCH] Change variable name. --- handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handler.py b/handler.py index b3f39fe..9ecad7b 100644 --- a/handler.py +++ b/handler.py @@ -6,8 +6,8 @@ import sys n_days = 7 -today = datetime.datetime.today() - datetime.timedelta(days=1) -week_ago = today - datetime.timedelta(days=n_days) +yesterday = datetime.datetime.today() - datetime.timedelta(days=1) +week_ago = yesterday - datetime.timedelta(days=n_days) # It seems that the sparkline symbols don't line up (probalby based on font?) so put them last # Also, leaving out the full block because Slack doesn't like it: '█' @@ -50,7 +50,7 @@ def report_cost(event, context): query = { "TimePeriod": { "Start": week_ago.strftime('%Y-%m-%d'), - "End": today.strftime('%Y-%m-%d'), + "End": yesterday.strftime('%Y-%m-%d'), }, "Granularity": "DAILY", "Filter": {