From 742aa4d2fc05d66dffd8cfea34f219f2d18e48b3 Mon Sep 17 00:00:00 2001 From: shenjianZ Date: Sat, 2 Aug 2025 11:21:32 +0800 Subject: [PATCH] feat: Display received time and fix timestamp timezone conversion. --- backend/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app.js b/backend/app.js index 1e3f4a8..ce4b870 100644 --- a/backend/app.js +++ b/backend/app.js @@ -29,7 +29,7 @@ app.get('/api/messages', async (req, res) => { try { 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}%`] ); res.json(rows);