diff --git a/internal/sub/calendar_expire_test.go b/internal/sub/calendar_expire_test.go index 281dd7383..2d611e54a 100644 --- a/internal/sub/calendar_expire_test.go +++ b/internal/sub/calendar_expire_test.go @@ -37,8 +37,9 @@ func TestSubscriptionCalendarExpireInclusive(t *testing.T) { {"Taipei midnight", "true", "Asia/Taipei", "2030-10-01T00:00:00+08:00", 1, 1, true}, {"New York daylight time", "true", "America/New_York", "2030-10-01T00:00:00-04:00", 1, 1, true}, {"New York standard time", "true", "America/New_York", "2030-02-01T00:00:00-05:00", 1, 1, true}, - {"Havana first midnight", "true", "America/Havana", "2026-11-01T00:00:00-04:00", 1, 1, true}, - {"Havana repeated midnight", "true", "America/Havana", "2026-11-01T00:00:00-05:00", 1, 1, false}, + // Past fallback on purpose: tzdata 2026f cancelled Cuba's 2026 one. + {"Havana first midnight", "true", "America/Havana", "2020-11-01T00:00:00-04:00", 1, 1, true}, + {"Havana repeated midnight", "true", "America/Havana", "2020-11-01T00:00:00-05:00", 1, 1, false}, {"UTC midnight is not Taipei midnight", "true", "Asia/Taipei", "2030-10-01T00:00:00Z", 1, 1, false}, {"midday unchanged", "true", "UTC", "2030-10-01T12:00:00Z", 1, 1, false}, {"other midnight unchanged", "true", "UTC", "2030-10-02T00:00:00Z", 1, 1, false}, diff --git a/internal/web/service/calendar_weekly_renew_test.go b/internal/web/service/calendar_weekly_renew_test.go index c42a92b7f..eb6ce35a2 100644 --- a/internal/web/service/calendar_weekly_renew_test.go +++ b/internal/web/service/calendar_weekly_renew_test.go @@ -10,10 +10,12 @@ func TestNextWeeklyRenewal_RepeatedMidnight(t *testing.T) { if err != nil { t.Fatal(err) } + // A past transition: tzdata 2026f cancelled Cuba's November 2026 fallback, + // so a future one makes the result depend on the host's tzdata version. for _, tt := range []struct{ expiry, want string }{ - {"2026-10-25T00:00:00-04:00", "2026-11-01T00:00:00-04:00"}, - {"2026-11-01T00:00:00-04:00", "2026-11-08T00:00:00-05:00"}, - {"2026-11-01T00:00:00-05:00", "2026-11-08T00:00:00-05:00"}, + {"2020-10-25T00:00:00-04:00", "2020-11-01T00:00:00-04:00"}, + {"2020-11-01T00:00:00-04:00", "2020-11-08T00:00:00-05:00"}, + {"2020-11-01T00:00:00-05:00", "2020-11-08T00:00:00-05:00"}, } { from, err := time.Parse(time.RFC3339, tt.expiry) if err != nil {