diff --git a/app.py b/app.py index c2f0c06..adfe5b1 100644 --- a/app.py +++ b/app.py @@ -139,13 +139,22 @@ def return_day_data(members, total_members, today): for star in ["1", "2"]: if star in value["completion_day_level"][str(this_day)]: - star_time = ( - datetime.fromtimestamp( + if star == "1": + star_time = ( + datetime.fromtimestamp( + value["completion_day_level"][str(this_day)][star]["get_star_ts"] + ) + - time_started + ) + else: + star_time = datetime.fromtimestamp( value["completion_day_level"][str(this_day)][star]["get_star_ts"] + ) - datetime.fromtimestamp( + value["completion_day_level"][str(this_day)]["1"]["get_star_ts"] ) - - time_started - ) star_time_string = "" + if star == "2": + star_time_string += "+ " if star_time.days > 0: star_time_string += f"{star_time.days} days " if star_time.seconds // 3600 > 0: diff --git a/templates/index.html b/templates/index.html index f7fb197..7e2a6ff 100644 --- a/templates/index.html +++ b/templates/index.html @@ -456,7 +456,7 @@