refactor: move the server-reset clock out of daily.ts

Ticks are about to stop being its only caller: the countdown needs the same
grid, and daily.ts already imports time.ts, so asking for it the other way
would close a cycle. time.ts is where it belongs anyway — it has held
REGION_RESET_UTC_OFFSET all along, and serverOffsetUtc is that table's
accessor. Nothing changes shape; `shift` is exported as `resetShiftMs`
because dayKey now reads it across a module boundary.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lucas WintherandClaude Opus 5 committed 2026-08-18 21:48:00 +02:00
1 parent c2fe249d83
commit 00c3f5e2da
3 files changed
+72 -69

No files matched your search

+6 -3
View File
@@ -8,12 +8,15 @@ import {
isDaily,
msUntilReset,
nextResetMs,
resetHourFor,
RESET_HOUR_LOCAL,
resolveDaily,
streakOf,
} from "../src/shared/daily.ts";
import { DAY, HOUR } from "../src/shared/time.ts";
import {
DAY,
HOUR,
resetHourFor,
RESET_HOUR_LOCAL,
} from "../src/shared/time.ts";
const at = (iso: string) => Date.parse(iso);