diff --git a/internal/api/admin_scan_schedule_test.go b/internal/api/admin_scan_schedule_test.go index 09f5aff8..bb648d1e 100644 --- a/internal/api/admin_scan_schedule_test.go +++ b/internal/api/admin_scan_schedule_test.go @@ -91,8 +91,12 @@ func TestAdminScanSchedule_Patch_DailyMode(t *testing.T) { next, err := time.Parse(time.RFC3339, *resp.NextScheduledAt) if err != nil { t.Errorf("NextScheduledAt parse: %v", err) - } else if next.UTC().Hour() != 3 || next.UTC().Minute() != 0 { - t.Errorf("NextScheduledAt time = %v, want 03:00 UTC in some day", next) + } else if local := next.Local(); local.Hour() != 3 || local.Minute() != 0 { + // Handler computes next-fire from time.Now() in the host zone, so + // the local-time hour is what's stable across CI runners regardless + // of TZ; the wire timestamp is UTC but parses back to the same + // instant either way. + t.Errorf("NextScheduledAt local time = %v, want 03:00 in host zone", local) } } }