Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
larsvantol committed Dec 14, 2023
1 parent 69dda6b commit e96dc2a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ <h2>Todays Puzzle</h2>
move(r, 2);
step = (step + 1) % 6;
}
setInterval(transitions, 3000);
setInterval(transitions, 30000);

async function get_data() {
let response = await fetch("http://localhost:5000/data");
Expand Down

0 comments on commit e96dc2a

Please sign in to comment.