From 4d3e562710d020a876b652149c708cbda732ecfb Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 8 Jun 2021 00:44:11 +0200 Subject: [PATCH] fix display and using right tz --- src/utils/time.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/time.py b/src/utils/time.py index 39f4c30..b53e8f5 100644 --- a/src/utils/time.py +++ b/src/utils/time.py @@ -73,7 +73,7 @@ def timedeltaToString(time): def getAge(date): """Recupère un age précisément à la seconde près""" - joursRestants = datetime.now() - date + joursRestants = intToDatetime(nowCustom()) - date years = joursRestants.total_seconds() / (365.242 * 24 * 3600) months = (years - int(years)) * 12 days = (months - int(months)) * (365.242 / 12) @@ -94,7 +94,7 @@ def ageLayout(tuple): affichage = [5] if tuple[4] > 0: affichage = [4, 5] - for i in [3, 0]: + for i in range(3, 0, -1): if tuple[i] > 0: affichage = [i, i + 1, i + 2] for i in affichage: