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) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
c2fe249d83
commit
00c3f5e2da
+6
-3
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user