Commit 816b3fac authored by Kristian Tan's avatar Kristian Tan

Displaying daily total on html

parent ec047040
...@@ -83,7 +83,6 @@ def toggle_pin(change_pin): ...@@ -83,7 +83,6 @@ def toggle_pin(change_pin):
message += " off." message += " off."
if pins[change_pin]['on_time'] is not None: if pins[change_pin]['on_time'] is not None:
latest_entry = db.session.query(DailyUsage).order_by(DailyUsage.id.desc()).first() latest_entry = db.session.query(DailyUsage).order_by(DailyUsage.id.desc()).first()
print(latest_entry_date)
start_time = pins[change_pin]['on_time'] start_time = pins[change_pin]['on_time']
# Get the elapsed time and strip away milliseconds # Get the elapsed time and strip away milliseconds
elapsed = int((datetime.now() - start_time).total_seconds()) elapsed = int((datetime.now() - start_time).total_seconds())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment