Vous pouvez essayer ce code, j'ai eu le même problème et cela a fonctionné pour moi.
const sequelize = new Sequelize(mysql.database, mysql.user, mysql.password, {
host: mysql.host,
port:3306,
dialect:'mysql',
define: {
underscored: true,
freezeTableName: true, //use singular table name
timestamps: false, // I do not want timestamp fields by default
},
dialectOptions: {
useUTC: false, //for reading from database
dateStrings: true,
typeCast: function (field, next) { // for reading from database
if (field.type === 'DATETIME') {
return field.string()
}
return next()
},
},
timezone: '+01:00'
});