From 914142541ae26bc0df798d7c536f23f175dfabd2 Mon Sep 17 00:00:00 2001 From: shaw Date: Tue, 14 Oct 2025 11:29:33 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=20=E4=BF=AE=E5=A4=8D=E8=B4=A6?= =?UTF-8?q?=E6=88=B7=E5=88=B0=E6=9C=9F=E6=97=B6=E9=97=B4=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=8C=BA=E5=81=8F=E5=B7=AE=E9=97=AE=E9=A2=98"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 46ba514801d53c183d604b4453c5cb2103a17ad6. --- .../src/components/accounts/AccountExpiryEditModal.vue | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/web/admin-spa/src/components/accounts/AccountExpiryEditModal.vue b/web/admin-spa/src/components/accounts/AccountExpiryEditModal.vue index 61f2438c..046c3332 100644 --- a/web/admin-spa/src/components/accounts/AccountExpiryEditModal.vue +++ b/web/admin-spa/src/components/accounts/AccountExpiryEditModal.vue @@ -304,14 +304,7 @@ const selectQuickOption = (value) => { // 更新自定义过期时间 const updateCustomExpiryPreview = () => { if (localForm.customExpireDate) { - // 手动解析日期时间字符串,确保它被正确解释为本地时间 - const [datePart, timePart] = localForm.customExpireDate.split('T') - const [year, month, day] = datePart.split('-').map(Number) - const [hours, minutes] = timePart.split(':').map(Number) - - // 使用构造函数创建本地时间的 Date 对象,然后转换为 UTC ISO 字符串 - const localDate = new Date(year, month - 1, day, hours, minutes, 0, 0) - localForm.expiresAt = localDate.toISOString() + localForm.expiresAt = new Date(localForm.customExpireDate).toISOString() } }