diff --git a/app.py b/app.py index 8e7360d..a70e85a 100644 --- a/app.py +++ b/app.py @@ -91,7 +91,7 @@ def generate_report(user_id, begin_date, end_date): timestamp = parse_iso_datetime(row["ts"]) if timestamp < begin_dt or timestamp > end_dt: continue - delta = row["ts"] - timestamp + delta = end_dt - timestamp if row["paid"]: paid_seconds += delta.total_seconds() else: