fix(tz): one default zone, and the user's own calendar where Berlin was hard-coded

The status assessments folded their recent days, weeks, months and years on
Berlin days whatever the user's zone, the mood and cycle crosstabs keyed
their metric days in Berlin, the resting-pulse proxy defaulted to Berlin
days, the briefing's opener rotated at Berlin midnight, and every
assessment prompt labelled today's date as Berlin's. They now use the
user's zone. Rollup months and years are labelled by their UTC start,
which is how they are cut; read in a zone west of UTC the label named the
month before.

"Europe/Berlin" was written out in some eighty places. DEFAULT_TIMEZONE in
lib/tz/format is now the one definition: the second copy in mood/date-key,
DISPLAY_TIMEZONE, the Berlin-only day key helpers and the per-route copies
are gone. An in-repo lint rule rejects the literal outside lib/tz and
tests; four areas another change owns are listed as pending.
This commit is contained in:
Marc-André Bombeck committed 2026-09-26 16:23:14 +02:00
1 parent c366d4946c
commit 9d2fd1db14
124 files changed
+705 -415

No files matched your search

@@ -101,8 +101,8 @@ describe("cycle crosstab day values (#1023)", () => {
expect(aggRows.length).toBeLessThan(500);
for (const type of PHASE_CROSSTAB_METRIC_TYPES) {
const expected = metricDayMap(raw, type, null);
const actual = metricDayMap(aggRows, type, null);
const expected = metricDayMap(raw, type, null, "Europe/Berlin");
const actual = metricDayMap(aggRows, type, null, "Europe/Berlin");
expect([...actual.keys()].sort(), type).toEqual(
[...expected.keys()].sort(),
);
+1 -1
View File
@@ -113,7 +113,7 @@ afterAll(async () => {
describe("pulse status over a dense stream (#1023)", () => {
it("builds the graded series without materialising the stream", async () => {
const graded = await measure(() =>
buildGradedSeriesWithRollups(DENSE_USER, "PULSE", NOW),
buildGradedSeriesWithRollups(DENSE_USER, "PULSE", NOW, "Europe/Berlin"),
);
const series = graded.result;
// Every reading in the 91-day window is accounted for, one bucket per day