feat: Display received time and fix timestamp timezone conversion.

This commit is contained in:
shenjianZ 2025-08-02 11:21:32 +08:00
parent 9ab3621658
commit 742aa4d2fc
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ app.get('/api/messages', async (req, res) => {
try { try {
const [rows] = await db.execute( const [rows] = await db.execute(
'SELECT id, sender, recipient, subject, body, received_at FROM emails WHERE recipient LIKE ? ORDER BY received_at DESC', 'SELECT id, sender, recipient, subject, body, CAST(received_at AS CHAR) as received_at FROM emails WHERE recipient LIKE ? ORDER BY received_at DESC',
[`%${recipient}%`] [`%${recipient}%`]
); );
res.json(rows); res.json(rows);