后端建立 TypeScript 构建链路
This commit is contained in:
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user