Skip to content

Commit

Permalink
Fix time errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lulunac27a committed Jan 21, 2025
1 parent 7fba9a5 commit fa6e7b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ def add_xp(self, amount: float) -> None: # add XP
amount - the amount to add XP.
"""
current_time: datetime = datetime.now(timezone.utc) # get current time
last_time_clicked_aware: datetime = self.last_time_clicked.replace(
tzinfo=timezone.utc
) # set timezone to UTC
time_difference: timedelta = (
current_time - self.last_time_clicked
current_time - last_time_clicked_aware
) # get time difference
time_difference_seconds: float = (
time_difference.total_seconds()
Expand Down

0 comments on commit fa6e7b3

Please sign in to comment.