From a49fde87a61da24955d222e10505d8392016b3ba Mon Sep 17 00:00:00 2001 From: Michael McCarty Date: Tue, 14 Jul 2026 06:41:14 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(eggday):=20determine=20start?= =?UTF-8?q?=20phase=20by=20timestamp=20before9AM=20PT=20on=20Jul14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/leaderboard/eggday.go | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/leaderboard/eggday.go b/src/leaderboard/eggday.go index 2a35726f..79216bd6 100644 --- a/src/leaderboard/eggday.go +++ b/src/leaderboard/eggday.go @@ -139,24 +139,12 @@ func CollectEggDayManual(s *discordgo.Session, target string, dryRun bool, onPro now := time.Now().In(loc) year := now.Year() - yearStr := fmt.Sprintf("%d", year) - // Check if any player already has a start stat for this year - hasStart := false - userIDs := GetAllOptInUserIDs() - for _, u := range userIDs { - if GetStatForPlayerAndSnapDate("egg_day_se_start", u, yearStr) != nil { - hasStart = true - break - } - } - // We collect start stats if we are on July 14th (or earlier) and don't have start stats yet. + // We collect start stats if we are before July 14th at 9:00 AM PT. // Otherwise, we collect end stats and calculate. - isStartPhase := !hasStart - if now.Month() == time.July && now.Day() == 14 && now.Hour() < 12 { - isStartPhase = true - } + eventStart := time.Date(year, time.July, 14, 9, 0, 0, 0, loc) + isStartPhase := now.Before(eventStart) if isStartPhase { if onProgress != nil {