fix(cron): fix timezone display bug, add tz validation and skill docs
This commit is contained in:
1 parent
2c3a568e46
commit
6bae6a617f
5 files changed
+24
-13
No files matched your search
@@ -32,7 +32,7 @@ def _compute_next_run(schedule: CronSchedule, now_ms: int) -> int | None:
|
||||
try:
|
||||
from croniter import croniter
|
||||
from zoneinfo import ZoneInfo
|
||||
# Use the caller-provided reference time for deterministic scheduling.
|
||||
# Use caller-provided reference time for deterministic scheduling
|
||||
base_time = now_ms / 1000
|
||||
tz = ZoneInfo(schedule.tz) if schedule.tz else datetime.now().astimezone().tzinfo
|
||||
base_dt = datetime.fromtimestamp(base_time, tz=tz)
|
||||
|
||||
Reference in new issue
Block a user