Skip to content

fix: compare inclusion dates in the schedule's time zone - #175

Merged
dwsmith1983 merged 1 commit into
mainfrom
fix/inclusion-timezone
Nov 22, 2026
Merged

dwsmith1983 merged 1 commit into
mainfrom
fix/inclusion-timezone

Conversation

@dwsmith1983

Copy link
Copy Markdown
Owner

The watchdog's missed-inclusion check compared inclusion dates with the UTC date. With schedule.timezone America/New_York and an inclusion date of 2026-03-31, the date became due at 2026-03-31T00:00Z, 20:00 the evening before in New York. The schedule.time gate applies only when the date is today in the schedule's zone, so it did not hold the alert back: IRREGULAR_SCHEDULE_MISSED was published early, and its once-per-date marker then kept the alert from being sent for a real miss the next day. East of UTC the check waited for UTC midnight instead.

  • Zone. PastInclusionDates takes a location and compares with today's date in schedule.timezone (UTC when unset), the same zone the schedule.time gate and the exclusion check use.
  • When it fires. On the date at schedule.time when it is set, at local midnight of the date otherwise. The docs say so and recommend setting time to avoid an alert before the run is due.

The missed-inclusion check compared inclusion dates with the UTC date.
West of UTC an inclusion date became due at UTC midnight, the local
evening before, where the schedule.time gate did not apply, so
IRREGULAR_SCHEDULE_MISSED fired early and its once-per-date marker then
suppressed the alert for a real miss. East of UTC it waited for UTC
midnight.

PastInclusionDates now takes the location and compares with today's
date in schedule.timezone, the same zone the time gate uses.
@github-actions github-actions Bot added tests Test changes lambda Lambda handlers docs Documentation labels Nov 22, 2026
@dwsmith1983 dwsmith1983 self-assigned this Nov 22, 2026
@dwsmith1983
dwsmith1983 merged commit 3f14f71 into main Nov 22, 2026
12 checks passed
@dwsmith1983
dwsmith1983 deleted the fix/inclusion-timezone branch November 22, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation lambda Lambda handlers tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant