Skip to content

fix(frontend): enter a hackathon's start and end as Zurich date and time - #447

Merged
sabinem merged 1 commit into
mainfrom
fix/hackathon-zurich-times
Nov 20, 2026
Merged

sabinem merged 1 commit into
mainfrom
fix/hackathon-zurich-times

Conversation

@sabinem

@sabinem sabinem commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Hackathons close when organizers say they do

Before: organizers could only pick a date, which was saved as midnight UTC. Every hackathon therefore closed at 01:00 on its last day. During "From Bits to Breakthroughs 2026", a one-day event on 13 November, nobody could join, invite links had expired, and the event showed as finished all day. Now organizers pick a date and a time in Zurich time, and the hackathon closes exactly then.

  • Organizers: set start and end as date and time, in Zurich time, when creating or editing a hackathon
  • The edit form shows saved values in Zurich time, so saving it unchanged keeps them
  • Times are read as Europe/Zurich on purpose, not in the server's own time zone, which is UTC in the cluster

Left out:

  • Existing hackathons: no data migration. The upcoming hackathon gets its times set by re-saving it in the edit form. Past hackathons keep their old values. Invite links made before the fix keep their old expiry, so revoke them and send new ones.
  • Phases: phase times are still read in the server's time zone (UTC in the cluster), so they are stored an hour off. Phases don't control what anyone can do, so they're left for a separate fix on main.
  • Exact times on hackathon and invitation pages: follow-up on main.

Verified: frontend lint and all tests pass, with new tests for winter time, summer time and both clock-change days.

The create and edit forms offered a date only, and the server action
parsed it with `new Date("2026-11-13")`, which is 00:00 UTC. `ends_at` is
the moment the backend closes a hackathon, so every hackathon closed at
01:00 Zurich time on its own last day: Join and Leave were refused,
invite links defaulting to `ends_at` expired, and a one-day hackathon
went straight from PENDING to FINISHED. "From Bits to Breakthroughs 2026"
(2026-11-13) hit exactly this.

Both forms now take a date and a time, read explicitly as Europe/Zurich
by `$lib/utils/eventTime` — not by `new Date()`, which on the server
reads a bare date-time in the container's UTC clock. The edit form shows
stored values on the same clock, so saving it unchanged keeps them, and
`ends_at` stays what it says: the moment the hackathon ends.

Hackathons and invites created before this keep their midnight-UTC
values; they are corrected by a one-off SQL update, not by this commit.

(cherry picked from commit 323278d)
@sabinem
sabinem merged commit 4d3a5b6 into main Nov 20, 2026
4 checks passed
@sabinem
sabinem deleted the fix/hackathon-zurich-times branch November 20, 2026 05:33
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.

1 participant