fix(admin-web): 时间渲染收口到 formatUtcTime,消灭 new Date().toLocaleString #10
Reference in New Issue
Block a user
Delete Branch "fix/admin-review-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
review 发现 4 处仍用 new Date(v).toLocaleString 渲染后端 UTC 口径时间戳——
正是 lib/format.ts 头注释明令消灭的反模式(SQLite 本地/非中国浏览器会差 8h,
生产靠 +00:00 偏移侥幸正确)。统一改用 formatUtcTime 按北京显示:
均为 server_default now()/datetime.now(utc) 的 UTC 口径字段。
HomeStatsConfig 的「下个更新时刻」用 epoch ms + 强制 Asia/Shanghai,正确,不动。
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
手机号/昵称原无 width,宽屏下吃满剩余空间显得失衡;操作列 fixed 230px 装不下 super_admin 的 5 个链接(详情/调金币/调现金/封禁/关调试链接)→ 换行。 - 手机号 width 130、昵称 width 150 + ellipsis(超长省略) - 操作列 230→300 + Space wrap={false},5 链接稳定一行 - scroll.x 1100→1160 同步 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>