fix: bugcollect 时间显示时区问题 - 追加 Z 表示 UTC 再转本地时间

Co-Authored-By: Claude <noreply@anthropic.com>
这个提交包含在:
XuqmGroup 2026-06-19 02:16:11 +08:00
父节点 1645e5a04e
当前提交 563a2c5628
共有 5 个文件被更改,包括 15 次插入5 次删除

查看文件

@ -123,7 +123,9 @@ const filters = ref({
function formatTime(ts: string) { function formatTime(ts: string) {
if (!ts) return '-' if (!ts) return '-'
return new Date(ts).toLocaleString('zh-CN') // UTC Z UTC
const date = ts.includes('Z') || ts.includes('+') ? new Date(ts) : new Date(ts + 'Z')
return date.toLocaleString('zh-CN')
} }
async function loadData() { async function loadData() {

查看文件

@ -170,7 +170,9 @@ function statusLabel(status: string): string {
function formatTime(ts: string): string { function formatTime(ts: string): string {
if (!ts) return '-' if (!ts) return '-'
return new Date(ts).toLocaleString('zh-CN') // UTC Z UTC
const date = ts.includes('Z') || ts.includes('+') ? new Date(ts) : new Date(ts + 'Z')
return date.toLocaleString('zh-CN')
} }
async function handleResolve() { async function handleResolve() {

查看文件

@ -143,7 +143,9 @@ function statusLabel(status: string): string {
function formatTime(ts: string) { function formatTime(ts: string) {
if (!ts) return '-' if (!ts) return '-'
return new Date(ts).toLocaleString('zh-CN') // UTC Z UTC
const date = ts.includes('Z') || ts.includes('+') ? new Date(ts) : new Date(ts + 'Z')
return date.toLocaleString('zh-CN')
} }
async function loadData() { async function loadData() {

查看文件

@ -111,7 +111,9 @@ function statusLabel(status: string): string {
function formatTime(ts: string) { function formatTime(ts: string) {
if (!ts) return '-' if (!ts) return '-'
return new Date(ts).toLocaleString('zh-CN') // UTC Z UTC
const date = ts.includes('Z') || ts.includes('+') ? new Date(ts) : new Date(ts + 'Z')
return date.toLocaleString('zh-CN')
} }
function truncateTitle(title: string, maxLen = 30): string { function truncateTitle(title: string, maxLen = 30): string {

查看文件

@ -123,7 +123,9 @@ function riskTagType(score?: number) {
function formatTime(ts: string) { function formatTime(ts: string) {
if (!ts) return '-' if (!ts) return '-'
return new Date(ts).toLocaleString('zh-CN') // UTC Z UTC
const date = ts.includes('Z') || ts.includes('+') ? new Date(ts) : new Date(ts + 'Z')
return date.toLocaleString('zh-CN')
} }
function truncateTitle(title: string, maxLen = 30): string { function truncateTitle(title: string, maxLen = 30): string {