"""Quiet-hours math, extracted verbatim from the old main.py. Everything takes the frame-like object duck-typed on quiet_hours_enabled/start/end, timezone, and refresh_interval_s -- both the old FrameConfig and the Frame ORM model satisfy it.""" from __future__ import annotations from datetime import date, datetime, timedelta from zoneinfo import ZoneInfo, available_timezones # Populated once from the OS's zoneinfo database (installed via the # `tzdata` apt package in the Dockerfile) and offered as a