Skip to content

fix: upgrade schedule to 1.2.2 to fix timezone-aware at() firing on r…#461

Merged
alexeyqu merged 1 commit into
masterfrom
dev
Jun 29, 2026
Merged

fix: upgrade schedule to 1.2.2 to fix timezone-aware at() firing on r…#461
alexeyqu merged 1 commit into
masterfrom
dev

Conversation

@alexeyqu

Copy link
Copy Markdown
Collaborator

…estart

The pinned commit of dbader/schedule (1.1.0 era) had a bug in _schedule_next_run: when a timezone was set, it compared self.at_time (in the target TZ, e.g. 20:00 Moscow) against now.time() in local UTC (e.g. 19:35 UTC). Since 20:00 > 19:35, it subtracted 1 day from next_run, landing in the past and causing run_pending() to fire the job immediately on every bot restart.

schedule 1.2.1 and 1.2.2 fix this (see dbader/schedule issues #583, #601-604, #623) by using datetime.now(at_time_zone) throughout.

Claude-Session: https://claude.ai/code/session_01YbEoMDXjYqaE6Vf8g2Cg5S

…estart

The pinned commit of dbader/schedule (1.1.0 era) had a bug in
_schedule_next_run: when a timezone was set, it compared self.at_time
(in the target TZ, e.g. 20:00 Moscow) against now.time() in local UTC
(e.g. 19:35 UTC). Since 20:00 > 19:35, it subtracted 1 day from
next_run, landing in the past and causing run_pending() to fire the job
immediately on every bot restart.

schedule 1.2.1 and 1.2.2 fix this (see dbader/schedule issues #583,
#601-604, #623) by using datetime.now(at_time_zone) throughout.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YbEoMDXjYqaE6Vf8g2Cg5S
@alexeyqu alexeyqu merged commit 0ec317f into master Jun 29, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant