Bootcamp gate uses the session's term; analytics "today" in Eastern time - #428
Conversation
- events.checkIn compared a member's bootcampTerm with currentTerm(), the wall clock, rather than the session's own bootcampTerm (which upsertSession stamps). The session's term now decides, falling back to the current term for events with none. - analyticsOverview's "check-ins today" started at server-local midnight. App Hosting runs in UTC, so the tile reset at 8pm Eastern, in the middle of evening events. It now starts at midnight America/New_York.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit edf380d. Configure here.
| eastern.getMinutes() * 60_000 + | ||
| eastern.getSeconds() * 1000 + | ||
| now.getMilliseconds()), | ||
| ); |
There was a problem hiding this comment.
DST skews Atlanta midnight window
Low Severity
startOfToday subtracts the Eastern clock time from now, which only equals Atlanta midnight on a 24-hour day. After the spring-forward or fall-back transition, that window starts an hour early or late, so checkinsToday counts the wrong hour of scans for the rest of those Sundays.
Reviewed by Cursor Bugbot for commit edf380d. Configure here.
Review follow-up. Subtracting the Eastern clock time from now only lands on midnight on a 24-hour day; on the spring-forward and fall-back Sundays the check-ins-today window started an hour off. startOfEasternDay now takes today's Eastern date and keeps whichever of the two Eastern offsets reads 00:00 there (the switch is at 2am, so midnight always exists exactly once). Tested on both DST days.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Visit the preview URL for this PR (updated for commit de0a218): https://hacklytics2027--pr-428-xtd47l7u.web.app (expires Fri, 02 Oct 2026 13:28:23 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c48ba34db61581e25fe2978355160b5eefe0e83f |


Automated PR tracking changes from
fix/term-and-timezoneintodev.Note
Medium Risk
Changes admission rules for bootcamp-only events and how daily check-in metrics are bounded; both affect live event operations but are narrowly scoped with new tests.
Overview
Bootcamp QR check-in now compares a member’s
bootcampTermto the session’s stored term (event.bootcampTerm, falling back tocurrentTerm()), not the calendar “current” term at scan time. That keeps past/future-term sessions gated correctly when the semester rolls over.Admin analytics
checkinsTodaycounts scans since Eastern (Atlanta) midnight via new exportedstartOfEasternDay, fixing UTC server rollover that treated “today” as flipping around 8pm Eastern.Tests cover
startOfEasternDay(including DST edge cases) and bootcamp admit/deny by session term.Reviewed by Cursor Bugbot for commit de0a218. Bugbot is set up for automated code reviews on this repo. Configure here.