后端建立 TypeScript 构建链路

This commit is contained in:
yml
2026-05-21 13:36:38 +08:00
parent 25671078d6
commit 1476522ab5
18 changed files with 798 additions and 101 deletions
+8
View File
@@ -0,0 +1,8 @@
export function nowIso(): string {
return new Date().toISOString()
}
export function addHours(baseIso: string | null | undefined, hours: number): string {
const baseTime = baseIso ? new Date(baseIso).getTime() : Date.now()
return new Date(baseTime + hours * 60 * 60 * 1000).toISOString()
}