fix the UTF8 time display errer
This commit is contained in:
+2
-1
@@ -12,7 +12,8 @@ const pool = mysql.createPool({
|
|||||||
queueLimit: 0,
|
queueLimit: 0,
|
||||||
multipleStatements: true,
|
multipleStatements: true,
|
||||||
charset: 'utf8mb4', // 確保這一行存在
|
charset: 'utf8mb4', // 確保這一行存在
|
||||||
timezone: '+08:00' // 強制時區一致
|
timezone: '+08:00', // 強制時區一致
|
||||||
|
dateStrings: true // 強制將日期作為字串回傳,避免 Node.js 進行二次時區轉換
|
||||||
});
|
});
|
||||||
|
|
||||||
// 啟動測試
|
// 啟動測試
|
||||||
|
|||||||
Reference in New Issue
Block a user