From 6c44beda672242714bab1100b1f0576cdce255ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elisi=C3=A1rio=20Couto?= Date: Fri, 7 Jun 2024 20:54:58 +0100 Subject: [PATCH] fix(sync): Correctly calculate days left. --- leggen/commands/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leggen/commands/sync.py b/leggen/commands/sync.py index 09d2415..bb22970 100644 --- a/leggen/commands/sync.py +++ b/leggen/commands/sync.py @@ -27,7 +27,7 @@ def sync(ctx: click.Context): if account_status != "LINKED": created_at = datetime.datetime.fromisoformat(r["created"]) now = datetime.datetime.now(tz=datetime.timezone.utc) - days_left = 90 - (created_at - now).days + days_left = 90 - (now - created_at).days if days_left <= 15: n = { "bank": r["institution_id"],