new Date() in a React server component is evaluated when the page renders. On a statically prerendered page, that is build time. PubTrivia's footer knows this, because the comment above it says so:
new Date() in a server component is evaluated when the page is rendered, so on a statically prerendered page it is the build year rather than the current one. Both pages that use this footer are static, so the year is passed in by the caller only where it can be kept live The function underneath that comment is three lines long and takes no arguments:
export function CopyrightLine() { return <p>© {new Date().getFullYear()} {PUBLISHER.name}</p> } There is no caller passing a year, because there is no parameter to pass one to. The comment describes a design that was reasoned about and not built, which is a more interesting kind of bug than a typo.
So I went looking for every other place the site touches a clock. There are nine, they disagree, and two of them are correct for a reason nobody wrote down.
Clock 1: the build
I fetched all 111 URLs in the live sitemap. 109 answer with x-nextjs-prerender: 1 and cache-control: public, max-age=0, must-revalidate; two (/ and /pricing) are per-request with private, no-cache, no-store. All 111 currently show © 2026 CogniPrep Ltd.
On the 109, that year is a build artefact. The build instant is not a secret either, because the sitemap publishes it: the three hand-written legal pages have no registry entry, so their lastModified falls back to the build date, and the generated XML says
<lastmod>2026-11-16T18:52:56.539Z</lastmod> while the other 108 entries are dates at midnight UTC. The CDN objects I measured are between 0 and 125,923 seconds old, median 111,633, so a copy of a page carrying that year lives at the edge for about a day and a third before anything re-validates it.
The practical risk is small, because this project deploys often and a redeploy in January fixes itself. The structural oddity is what interests me: the two pages where the year is computed per request are the homepage and the pricing page, and the three pages with the strongest claim to a correct copyright line, which are the terms, the privacy policy and the cookie policy, are static.
Clocks 2 and 3: dates typed by a human, formatted by one honest formatter
Content dates do not come from a clock at all. Each page's registry entry carries an updated string, and that one string becomes the sitemap lastmod, the datePublished and dateModified in the JSON-LD, and a visible "Last reviewed" line. Across the 111 live pages:
distinct lastmod values in the sitemap 8 lastmods from a registry date 108 lastmods from the build clock 3 pages with a visible "Last reviewed" line 60 distinct visible review dates 5 The five dates are 14 September, 15 October, 4 November, 15 November and 16 November, with 46 pages on the oldest and 48 on the newest. The newest is the 35-page content commit from two days ago.
The formatter for the visible line is the one piece of date handling in the repository I would not change:
new Date(`${node.updated}T00:00:00Z`).toLocaleDateString(locale, { day: "numeric", month: "long", year: "numeric", timeZone: "UTC" }) Both halves matter. The T00:00:00Z stops 2026-11-16 from being parsed as local midnight, and timeZone: "UTC" stops the formatter from rendering it a day early for a reader in Auckland. Without either one, 60 pages would show two different dates depending on where you opened them.
A prior post on this project covered the related defect in the same data, which is that datePublished and dateModified are set from the same updated field, so every article claims it has never been revised. I confirmed it again here: on all 60 pages, the two values are identical.
Clock 4: Europe/London, in the one place nobody sees
The operator admin area builds three Intl.DateTimeFormat instances at module scope, and all three name a zone:
new Intl.DateTimeFormat('en-GB', { timeZone: 'Europe/London', ... }) That is the right call for an operator in Britain reading when a session started, and it is the only place in the app where a zone is chosen rather than inherited. It is also behind three separate refusals and invisible to every visitor.
Clock 5: the signed-in pages, which name no zone at all
Four places in the dashboard format a date with toLocaleDateString('en-GB', ...) and no timeZone. For a client component that is the browser's zone, which is defensible. For a server component it is the renderer's zone, which on this platform is UTC, so the same stored timestamp can render as two different days in two different parts of the same page. None of it is public, so I cannot demonstrate it, and I am reporting it as a hazard rather than a measured bug.
Two export buttons also build filenames with new Date().toISOString().slice(0, 10), which is deliberately the UTC date. A user in Auckland pressing export at 10am gets yesterday's date on the file. That is arguably correct and definitely surprising.
Clock 6: the visitor's clock, inside every PDF
Every file the free tools produce carries the visitor's own offset out into the world. From a poster downloaded off the live tool an hour ago:
/Producer (jsPDF 4.2.1) /CreationDate (D:20261118114112+01'00') +01'00' is my machine, not the server. Nothing uploads it, but if that PDF is emailed to a brewery, the brewery learns which hour band the person who made it was sitting in. It is the only piece of visitor environment that escapes the "nothing leaves your browser" promise, and it escapes by being written into a file the visitor then sends somewhere themselves.
Clock 7: the planner, which has no clock
The round planner turns a set of rounds into a running order with real times on it. It contains zero occurrences of Date. The start time is parsed out of an <input type="time"> into minutes since midnight, every round adds minutes, and the clock is formatted back with integer division:
const hours = Math.floor(total / 60) % 24 That modulo is the entire concept of a day in this tool, and it is correct arithmetic with no notion of tomorrow. Set the start time to 23:30 on the live page and the running order reads:
1 hr 51 min, finishes about 01:21 23:30 Welcome and rules (5 min) 23:35 Round 1: Standard round (13 min) 23:48 Round 2: Music round (16 min) 00:04 Round 3: Standard round (13 min) 00:17 Break (15 min) 00:32 Round 4: Picture round (12 min) 00:44 Round 5: List or connections round (19 min) 01:03 Round 6: Quickfire / true or false (8 min) 01:11 Results and prize (10 min) The step from 23:48 to 00:04 is silent. There is no date, no "next day" marker, and nothing anywhere in the tool that could produce one, because it never learns what day it is. For a pub quiz that is nearly always fine; printed and handed to a stand-in host it is one more thing to work out.
An earlier post on this project used the same input's empty state as a demo: clear the time field and the order keeps starting at 20:00, because the parser falls back to 8pm when it gets NaN. Both behaviours come from the same place, which is that the planner is pure arithmetic over a string and has no clock to ask.
There is also no test for any of it. The two tools with test files, the poster layout and the profit arithmetic, have 16 tests each. The planner's time formatting has none, which is a shame, because % 24 and a two-digit pad are exactly the kind of code a test pins down in four lines.
Clocks 8 and 9: the one place the device clock is distrusted
The last entry is the opposite of everything above. There is a small browser-side module whose entire job is to stop trusting Date.now(): it records a server timestamp when one arrives, keeps the offset between that and the local clock, and exposes a corrected now that every countdown reads instead. A phone with a clock minutes out of true is common in the wild, and anything timed against the device would be wrong by exactly that much.
It is a singleton per tab, it ignores malformed values so a bad payload cannot corrupt the offset, it falls back to an offset of zero before the first sync, and it has five unit tests, which is five more than the planner's clock. It is the only module in the codebase that treats "what time is it" as a question with a wrong answer.
The inventory
clock zone consumer ---------------------------- -------------------- ---------------------------- build-time new Date() build machine footer year on 109 pages build-time new Date() UTC in the output 3 sitemap lastmods registry "updated" strings none, it is a string 108 lastmods, 60 visible dates ContentPage formatter UTC, explicit "Last reviewed" line admin formatters (x3) Europe/London operator screens dashboard formatters (x4) inherited signed-in pages export filenames UTC, explicit two download buttons jsPDF CreationDate the visitor's offset every generated PDF round planner none at all the running order server clock offset helper none needed in-app countdowns Two of those rows name a zone on purpose (the first two are the same clock, read twice). One of them names the build machine's zone by accident. One carries a stranger's zone into a file. And one has no clock at all and is the better for it.
What I would change
- Give
CopyrightLinetheyearprop its own comment already promises, and pass the current year from the two dynamic pages, or just hard-code the founding year and stop pretending. - Set
dateModifiedfrom a separate field so a revised page can say it was revised. - Add
timeZoneto the four dashboard formatters, even where the current behaviour is right, so the next reader does not have to work out which half of the app each one renders in. - Four tests on the planner's clock, one of which asserts that a late quiz crosses midnight.
- Decide whether the PDF should carry a timestamp at all. jsPDF will take a
/CreationDateyou give it.
If you want to watch the midnight one happen, the planner is here, the start time is the first field, and no sign-up is involved. The footer year is on every page, including the terms, where it has been the same number since 18:52 UTC on 16 November.

