Better today calculation, corrected schedule

This commit is contained in:
2022-06-03 08:19:18 -05:00
parent 1cc0eaa3ad
commit 1164e1e66c
3 changed files with 10 additions and 3 deletions

View File

@@ -44,4 +44,11 @@ class WordleDay:
return self.wordle_no == other.wordle_no
WORDLE_TODAY = WordleDay.from_date(datetime.date.today())
# Designed so that "today" will be the current date in CST
# Regardless of where the code is run
today = (
datetime.datetime.now(datetime.timezone.utc)
.astimezone(datetime.timezone(datetime.timedelta(hours=-5), name="US Central"))
.date()
)
WORDLE_TODAY = WordleDay.from_date(today)