Sequelize 的 createdAt 時間不對


Posted by Rich on 2021-09-15


createdAt 的時間不是真實新增資料的時間。
原因:sequelize 存取的時間是按照 UTC 標準時間,所以我們需要調整一下時區。

在 config 下面的 config.json 裡面新增一行 timezone: "+08:00" 就可以解決。但如果你跟我是不一樣的時區就要再調整囉~










Related Posts

金魚都能懂的這個網頁畫面怎麼切 — 學習筆記01

金魚都能懂的這個網頁畫面怎麼切 — 學習筆記01

簡單的 JS 陣列 method 整理

簡單的 JS 陣列 method 整理

Find the Most Competitive Subsequence

Find the Most Competitive Subsequence


Comments