mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-14 13:12:22 +00:00
fix(sync): Correctly calculate days left.
This commit is contained in:
@@ -27,7 +27,7 @@ def sync(ctx: click.Context):
|
|||||||
if account_status != "LINKED":
|
if account_status != "LINKED":
|
||||||
created_at = datetime.datetime.fromisoformat(r["created"])
|
created_at = datetime.datetime.fromisoformat(r["created"])
|
||||||
now = datetime.datetime.now(tz=datetime.timezone.utc)
|
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:
|
if days_left <= 15:
|
||||||
n = {
|
n = {
|
||||||
"bank": r["institution_id"],
|
"bank": r["institution_id"],
|
||||||
|
|||||||
Reference in New Issue
Block a user