after I ran into this problem over and over again, I found the solution I wanted.
My nodeJS application data from mySQL data through Sequelize ORM.
Make sure the time zone is the same everywhere.
config.js :
const timezone = 'UTC' process.env.TZ = timezone
sequelize_config.js :
const sequelize = new Sequelize(database, user, password, options: { host, dialect: 'mysql', port, dialectOptions: { timezone: 'utc' }, } }
Hope this saves someone from getting into this cycle ... :)
DavidA
source share