I have set the timezone
option to my timezone (Europe/Zagreb
and I've tried with +02:00
too), and the time is saved as it should be, however, when reading the time from the database, Sequelize converts it to UTC. I have tried different timezones too, each is saved correctly, but always converted to UTC when read from database.
Am I doing something wrong or is this a known issue and are there any workarounds?
I create a new connection with:
sequelize = new Sequelize(config.database, config.username, config.password, config);
and my configuration looks something like this:
"development": {
"username": "root",
"password": "root",
"database": "db",
"host": "localhost",
"dialect": "mysql",
"timezone": "Europe/Zagreb"
}
typeCast
function indialectOptions
did the trick in my case. – Domiciliate