Better today calculation, corrected schedule
This commit is contained in:
2
.github/workflows/last-pull.yml
vendored
2
.github/workflows/last-pull.yml
vendored
@@ -2,7 +2,7 @@ name: Last Pull for Yesterday
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 2 * * *'
|
||||
- cron: '0 10 * * *'
|
||||
env:
|
||||
TWITTER_TOKEN: ${{ secrets.TWITTER_TOKEN }}
|
||||
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
|
||||
|
||||
2
.github/workflows/update.yml
vendored
2
.github/workflows/update.yml
vendored
@@ -2,7 +2,7 @@ name: Update Scores
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 4,8,10,16,18 * * *'
|
||||
- cron: '0 15,19,20,1,4 * * *'
|
||||
env:
|
||||
TWITTER_TOKEN: ${{ secrets.TWITTER_TOKEN }}
|
||||
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user