喻勇祥
8cda4c1a0b
fix: 修复时区问题 - 使用本地时区存储和比较时间
## 问题
- 之前使用UTC时间存储expires_at
- 前端解析时当成本地时间,导致显示时间差8小时
- 例如: 数据库存 08:37 (UTC),前端显示 08:37 (本地),实际应该显示 16:37
## 修复
1. database.js create方法: 使用本地时区格式化时间
- 使用 getFullYear/getMonth/getDate 等获取本地时间
- 格式化为 YYYY-MM-DD HH:MM:SS (本地时间)
2. database.js findByCode方法: 使用本地时区比较
- 改为 datetime('now', 'localtime')
- 确保与存储的本地时间格式匹配
3. 调试日志也使用本地时区
## 效果
- 创建分享时,expires_at存储的是服务器本地时间
- 前端显示时间与服务器时间一致
- 过期判断使用本地时区,结果正确
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 16:46:26 +08:00
..
2025-11-13 21:36:49 +08:00
2025-11-11 13:17:57 +08:00
2025-11-10 21:50:16 +08:00
2025-11-14 16:46:26 +08:00
2025-11-10 21:50:16 +08:00
2025-11-14 16:25:31 +08:00
2025-11-10 21:50:16 +08:00
2025-11-10 23:35:33 +08:00
2025-11-14 16:09:01 +08:00
2025-11-10 21:50:16 +08:00
2025-11-13 19:25:46 +08:00