fix(dashboard): put the mood card's instant on the user's local day

The mood series carries local day keys, and the summary wrote the newest
one out as UTC midnight. West of UTC that instant is the previous evening,
so a client formatting it in its own zone showed today's entry as
yesterday's. Emit the first instant of the day in the account's zone
instead; the field keeps its shape and type.
This commit is contained in:
Marc-André Bombeck committed 2026-10-01 09:27:56 +02:00
1 parent 1b694ec222
commit 2dc73be233
4 files changed
+40 -9

No files matched your search

+4 -3
View File
@@ -70819,9 +70819,10 @@ components:
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
- type: "null"
description: Instant behind `latestValue`, falling back to the metric's newest reading. For `mood` this is the day START
of the latest daily bucket, not a reading time — the series pins a day, so inventing an instant would be a
lie. For `bmi` it is the WEIGHT metadata, since BMI moves exactly when weight does.
description: Instant behind `latestValue`, falling back to the metric's newest reading. For `mood` this is the first
instant of the latest daily bucket's day in the account's time zone, not a reading time (the series pins a
local day, not an instant); formatted in that zone it always lands on the day the entry was logged. For
`bmi` it is the WEIGHT metadata, since BMI moves exactly when weight does.
allTimeCount:
type: integer
minimum: -9007199254740991