apscheduler遇到的问题

修复BUG

PytzUsageWarning: The zone attribute is specific to pytz's interface; please migrate to a new time zone provider. 
For more details on how to do so, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495)
from apscheduler.schedulers.background import BackgroundScheduler

sched = BackgroundScheduler(timezone='Asia/Shanghai')

 

posted @ 2021-11-04 14:58  zhangyao2018  阅读(7070)  评论(0编辑  收藏  举报