diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-09-08 17:06:51 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-09-08 17:06:51 +0200 |
| commit | bd2f982c489b15ce1165c051fdedf35af979f784 (patch) | |
| tree | 5c76d07f94b34f6b7b31be6a133793b2cdaccd79 /src/lib/server/services/groceries.ts | |
| parent | 6d69c7b1e6a8051338e052cc9d1836f4f1a20f51 (diff) | |
Migrate date handling from Date to Temporal API
Routine scheduling, health series, service stamps, session expiry, and
date formatting move to native Temporal (Instant / ZonedDateTime in
UTC), with ISO strings kept at DB and chart boundaries. Ambient types
in src/temporal-ambient.d.ts cover the native runtime; no polyfill.
Observable behavior and stored formats are unchanged.
Diffstat (limited to 'src/lib/server/services/groceries.ts')
| -rw-r--r-- | src/lib/server/services/groceries.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/server/services/groceries.ts b/src/lib/server/services/groceries.ts index 8ffcde3..9aa8102 100644 --- a/src/lib/server/services/groceries.ts +++ b/src/lib/server/services/groceries.ts @@ -96,7 +96,9 @@ export async function addOrUncheck( .values({ name, categoryId, - createdAt: new Date().toISOString(), + createdAt: Temporal.Now.instant().toString({ + smallestUnit: 'millisecond', + }), }) .returning(); |
