Sequelize 的 createdAt 時間不對


Posted by Rich on 2021-09-15


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

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










Related Posts

C# The way to store a temporary data: Memory Cache, Redis

C# The way to store a temporary data: Memory Cache, Redis

[Oracle SQL Tricks] Generating Dates Between Two Dates

[Oracle SQL Tricks] Generating Dates Between Two Dates

Day 95

Day 95


Comments