Files
hermes-agent/tests
JF Lemieux d6d29b0010 fix(cron): anchor croniter to the configured IANA timezone
croniter 6.x ignores tzinfo on its start time and instead uses the start's
UTC *offset* as its working offset. compute_next_run passed a tz-aware
last_run_at straight into croniter(expr, base_time), which produced two bugs:

- a last_run_at stored in UTC (+00:00) shifted the next fire to the cron
  hour in UTC rather than local time (09:00 UTC = 05:00 America/Toronto)
- on DST transition days the wall-clock hour drifted one hour off (08:00 on
  spring-forward, 10:00 on fall-back)

Render the base as the configured zone's naive wall clock for croniter,
then re-attach the zone to the result, so the wall-clock hour stays correct
every calendar day including DST boundaries. Fall back to the base's own
zone only when no timezone is configured.

Adds regression tests covering a UTC-stored last_run_at, spring-forward,
fall-back, and a full-year walk across both DST transitions.
2026-09-13 16:46:45 -07:00
..
…