| 97 | try { |
| 98 | const date = new Date(dateStr); |
| 99 | return date.toLocaleString("zh-CN", { timeZone: "Asia/Shanghai", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit" }); |
| 100 | } catch { |
| 101 | return dateStr; |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | // 构建游戏信息文本 |
| 106 | function buildGameText(game: EpicGame, index: number): string { |
| 107 | const title = htmlEscape(game.title); |
| 108 | const desc = game.description.length > 100 ? htmlEscape(game.description.slice(0, 100)) + "..." : htmlEscape(game.description); |
| 109 | const start = formatDate(game.startDate); |