IntervalSpec next-run calculation uses fixed UTC second alignment (((ts-phase)/interval+1)*interval+phase) and ignores ScheduleSpec.timezone for day-sized intervals. Schedules that mean “every N local days at a fixed local time” therefore do not track DST (e.g. US/Pacific: local midnight stays 07:00 UTC in PDT but should move to 08:00 UTC in PST after the fall transition).
StructuredCalendar / cron paths already use the loaded *time.Location; interval-only schedules do not.
ScheduleSpec.timezone=America/Los_Angeles(or any IANA zone with DST).Interval=24h,Phase=8h(first tick aligned to1970-01-01 00:00:00in that zone, i.e.time.Unix(8*3600,0)local representation).- Observe
rawNextTime/GetNextTimejust after 2018-11-04 local midnight and 2018-11-05 local midnight:- Before fix: every tick is
k * 86400seconds from the same UTC phase (e.g. always07:00Zin this setup). - After fix: 2018-11-04
00:00local is still PDT →07:00Z; 2018-11-0500:00local is PST →08:00Z.
- Before fix: every tick is
When interval is a positive multiple of 86400 and the schedule has a non-UTC location, interpret the step as N whole calendar days in that location at the same local time-of-day as the grid reference time.Unix(phase mod interval, 0).In(loc).
When the location is UTC (or unset/empty in a way that resolves to UTC), keep the existing fixed-UTC-second behavior for compatibility.
43hor other non–whole-day intervals: unchanged.- This does not try to turn “24h” into “civil 24h” in zone for non-86400-multiple durations.
Common use case: IntervalSpec for “every N days or weeks” with an end-user or workspace-scoped IANA time zone, where local wall time should remain stable when DST changes.