Fix scheduler timezone: use ZoneInfo(settings.scheduler_timezone) not 'local'

This commit is contained in:
Scott Idem
2026-03-17 22:38:11 -04:00
parent 4253e69c0b
commit b123dc3117
2 changed files with 3 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ Set AUTO_DISTILL=false to disable entirely.
Set AUTO_DISTILL_LONG=true to enable monthly long-term integration.
"""
import logging
from zoneinfo import ZoneInfo
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from config import settings
@@ -57,7 +58,7 @@ def start() -> None:
logger.info("auto distillation disabled (AUTO_DISTILL=false)")
return
_scheduler = AsyncIOScheduler(timezone="local")
_scheduler = AsyncIOScheduler(timezone=ZoneInfo(settings.scheduler_timezone))
if settings.auto_distill_short:
_scheduler.add_job(_run_short, "cron", hour=3, minute=0, id="distill_short")