agronholm / agronholm/apscheduler
CronTrigger runs into infinite loop at daylight savings time boundary
- 主要語言
- Python
- 星號
- 7.6k
- 分支
- 783
- 平均合併
- 4 天 8 小時
- 30 天內合併 PR
- 5
描述
### Things to check first
- [x] I have checked that my issue does not already have a solution in the [FAQ](https://apscheduler.readthedocs.io/en/master/faq.html)
- [x] I have searched the existing issues and didn't find my bug already reported there
- [x] I have checked that my bug is still present in the latest release
### Version
3.11.0
### What happened?
Similar bug as https://github.com/agronholm/apscheduler/issues/980 which was fixed on master, this is on v3.11. I [commented](https://github.com/agronholm/apscheduler/issues/980#issuecomment-2499977654) this in that issue, but am now creating a separate issue since that issue was closed.
### How can we reproduce the bug?
```
from zoneinfo import ZoneInfo
from datetime import datetime
from apscheduler.triggers.cron import CronTrigger
tz = ZoneInfo("Europe/Helsinki")
trigger = CronTrigger(minute=30, timezone=tz)
dt = datetime(2017, 10, 29, 3, 45, tzinfo=tz, fold=1)
dt = trigger.get_next_fire_time(dt, dt)
# dt = datetime.datetime(2017, 10, 29, 3, 30, fold=1, tzinfo=zoneinfo.ZoneInfo(key='Europe/Helsinki'))
dt = trigger.get_next_fire_time(dt, dt)
# dt = datetime.datetime(2017, 10, 29, 3, 30, fold=1, tzinfo=zoneinfo.ZoneInfo(key='Europe/Helsinki'))
```
貢獻指南
評估
這個 Issue 還沒有評估資料。