Why my SQL queries do not return the same results between Forest Admin and my database tool?

One explanation would be that you have defined a particular time zone on your database.

In query mode, Forest Admin does not detect the time zone defined in your database.

That's why you see different results between Forest Admin and your database tool.

A workaround would be to specify your time zone in the connection between Sequelize and your db.

in models/index.js

let databaseOptions = {
  logging: process.env.NODE_ENV === 'development' ? console.log : false,
  pool: { maxConnections: 10, minConnections: 1 },
  dialectOptions: {},
  timezone: 'Australia/Sydney'
};

This option will override the auto-based  time zone defined in your project settings.

 


Did this help answer your question?

thumbs up
thumbs down

Thanks for the feedback! 🙏🏽