mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 07:42:23 +00:00
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:
1 parent
c366d4946c
commit
9d2fd1db14
124 files changed
+705
-415
No files matched your search
@@ -259,18 +259,10 @@ const RAW_ALLOWLIST: ReadonlyArray<{ file: string; why: string }> = [
|
||||
file: "src/components/measurement-reminders/vorsorge-section.tsx",
|
||||
why: "The ISO day the postpone request writes to the API. A wire value, and the wire format is ISO whatever the reader prefers.",
|
||||
},
|
||||
{
|
||||
file: "src/lib/gamification/achievements.ts",
|
||||
why: "The day key streak arithmetic counts on.",
|
||||
},
|
||||
{
|
||||
file: "src/lib/charts/bucket-time-series.ts",
|
||||
why: "Bucket boundary arithmetic. The bucket LABELS are a separate step and go through `makeBucketLabelFormatters`.",
|
||||
},
|
||||
{
|
||||
file: "src/lib/ai/prompts/insight-generator.ts",
|
||||
why: "An ISO day inside a model prompt. The model reads ISO; the user never sees this string.",
|
||||
},
|
||||
{
|
||||
file: "src/lib/jobs/measurement-reminder.ts",
|
||||
why: "The local day in the notification dedup key. Changing it with a display preference would re-send a claimed reminder.",
|
||||
@@ -283,10 +275,6 @@ const RAW_ALLOWLIST: ReadonlyArray<{ file: string; why: string }> = [
|
||||
file: "src/lib/i18n/relative-time.ts",
|
||||
why: "The en-CA day keys that decide today / yesterday. A comparison between two keys, never printed.",
|
||||
},
|
||||
{
|
||||
file: "src/lib/tz/resolver.ts",
|
||||
why: "The Berlin day formatter the zone arithmetic itself is built on.",
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user