fix(ui): 修复全局时区偏移问题与日期控件手动输入崩溃 Bug

This commit is contained in:
2026-04-28 16:19:41 +08:00
parent 110e75f0a1
commit bf57002313
6 changed files with 135 additions and 5 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import { db } from '@/db';
import { exchangeRates } from '@/db/schema';
import { eq } from 'drizzle-orm';
import { z } from 'zod';
import { nowInShanghai } from '@/libs/utils';
const updateExchangeRateSchema = z.object({
from: z.string().min(1).max(10),
@@ -33,7 +34,7 @@ export async function updateExchangeRate(
target: [exchangeRates.fromCurrency, exchangeRates.toCurrency],
set: {
rate: validation.data.rate,
updatedAt: new Date(),
updatedAt: nowInShanghai(),
},
});