ultime fix tz

This commit is contained in:
Mylloon 2021-06-08 01:51:53 +02:00
parent 5bdeb7a4d7
commit 049536d2b1

View file

@ -73,9 +73,10 @@ def timedeltaToString(time):
def getAge(date):
"""Recupère un âge précisément à la seconde près"""
heureAjouter = int(str(UTCDatetimeToCustomDatetime(intToDatetime(nowUTC()))).split('+')[1].split(':')[0])
joursRestants = intToDatetime(nowUTC()) - date
years = joursRestants.total_seconds() / (365.242 * 24 * 3600)
now = intToDatetime(nowUTC())
heureAjouter = int(str(UTCDatetimeToCustomDatetime(now)).split('+')[1].split(':')[0])
joursRestants = now - date
years = joursRestants.total_seconds() / (365.242 * 24 * 60 * 60)
months = (years - int(years)) * 12
days = (months - int(months)) * (365.242 / 12)
hours = (days - int(days)) * 24
@ -95,7 +96,7 @@ def ageLayout(tuple):
affichage = [5]
if tuple[4] > 0:
affichage = [4, 5]
for i in range(3, 0, -1):
for i in range(3, -1, -1):
if tuple[i] > 0:
affichage = [i, i + 1, i + 2]
for i in affichage: