fix(ui): 修复全局时区偏移问题与日期控件手动输入崩溃 Bug
This commit is contained in:
@@ -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(),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user