1
Fork 0
mirror of https://github.com/wlinator/luminara.git synced 2024-10-02 20:23:12 +00:00

Fix bug in daily reset time.

Dailies could be claimed infinitely between 12AM EST and the reset time, this issue has been resolved by making the check more specific.
This commit is contained in:
wlinator 2023-06-21 04:44:35 -04:00
parent e4e1af6e5e
commit a26d8a4c32

View file

@ -50,9 +50,10 @@ class Dailies:
return True
else:
check_time = datetime.now(tz=self.tz).replace(hour=7, minute=0, second=0, microsecond=0)
time_now = datetime.now(tz=self.tz)
reset_time = time_now.replace(hour=7, minute=0, second=0, microsecond=0)
if self.claimed_at < check_time:
if self.claimed_at < reset_time < time_now:
return True
return False