Skip to content

Dev: fix(events): align event timing with Luma EDT start/end instants#74

Merged
jenny07007 merged 3 commits into
mainfrom
dev
Jun 22, 2026
Merged

Dev: fix(events): align event timing with Luma EDT start/end instants#74
jenny07007 merged 3 commits into
mainfrom
dev

Conversation

@jenny07007

Copy link
Copy Markdown
Contributor

Summary

Event countdowns and upcoming-event visibility now use exact UTC timestamps derived from the event’s EDT start and end times. Previously, event visibility was based on UTC calendar-date strings. This could keep an event in the upcoming list until the end of the UTC day, even after its actual start time had passed. The new logic compares exact timestamps, so an event is removed from upcoming lists once startsAt has passed.

What changed

Area Before After
CortexEvent date represented a UTC calendar day Added startsAt and endsAt as ISO UTC timestamps. dateLabel is display-only
Upcoming-event filter event.date >= today using a UTC date key startsAt > now using the exact timestamp
Countdown Counted down to midnight UTC and disappeared at zero Counts down to startsAt, shows "Happening now" until endsAt, then shows "Event ended"
<time dateTime> Used event.date Uses event.startsAt

Event timing

For CONNEX Tech Fest:

  • Local source time: Jun 27, 2026, 9:00 AM-9:00 PM EDT
  • startsAt: 2026-06-27T13:00:00Z
  • endsAt: 2026-06-28T01:00:00Z

The local EDT times are converted to ISO UTC timestamps for storage and comparisons.

Architecture

Event content
src/lib/content/events.ts
        |
        | startsAt, endsAt, dateLabel
        v
getUpcomingEvents(events, now)
        |
        | filter: startsAt > now
        | sort by startsAt
        |
        +------------------------------+
        |                              |
        v                              v
getNextUpcomingEvent()            EventsSection
        |                         renders upcoming cards
        v                              |
HeaderUpcomingEvent                   |
shows dateLabel + title               |
                                      v
                               EventCountdown
                               updates every second
                                      |
                                      v
                         getEventTimingState(
                           startsAt,
                           endsAt,
                           now
                         )
                                      |
                    +-----------------+-----------------+
                    |                 |                 |
                    v                 v                 v
              Before start       During event       After end
                Countdown       "Happening now"    "Event ended"

Timeline behavior

Before startsAt          Between start and end       After endsAt
----------------------   -------------------------   ----------------------
Shown in header          Hidden from upcoming        Hidden from upcoming
Shown in event list      lists after ISR             lists
Countdown is active      revalidation

Open tab behavior:
Countdown                "Happening now"             "Event ended"

Test coverage

Added:

  • 8 tests for getEventTimingState
  • 6 tests for getUpcomingEvents and getNextUpcomingEvent

14 tests total, all passing.

Known limitations

The event card and header promo are server-rendered with 1-hour ISR caching, so they may stay visible briefly after the event starts. The client-side countdown handles this by showing the correct state in real-time ("Happening now" / "Event ended").

What’s next

Event content is currently hardcoded in src/lib/content/events.ts. After this event, we’ll build an event-submission pipeline to handle these.

jenny07007 and others added 2 commits June 22, 2026 22:40
- Use exact startsAt timestamp for upcoming visibility instead of UTC date string
- Add endsAt field to CortexEvent (CONNEX: 9 AM - 9 PM EDT)
- Show three countdown states: ticking clock, "Happening now", "Event ended"
- Add countdown and upcoming test coverage
fix(events): align event timing with Luma EDT start/end instants
@jenny07007 jenny07007 requested review from jhuhnke and santy311 June 22, 2026 15:17
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cortex-website Ready Ready Preview, Comment Jun 22, 2026 3:31pm

@jenny07007 jenny07007 merged commit 4052da1 into main Jun 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants