0

I am using sequelize and want to get depends on the date.
So when I write the code below, It works well.
But the problem is that since this is the UTC, the local time is different.
I need to move UTC time.
For example, "2019-08-21T00:00:00.000Z - 04:00:00".
How can I make this condition ? Thank you so much for reading.

   const total = await models.parcel.findAll({
      where: {
        createdAt: {
          [Op.between]: ['2019-08-21T00:00:00.000Z', '2019-08-21T23:59:59.999Z'],
        },
      },
    });
DD DD
  • 1,148
  • 1
  • 10
  • 33

0 Answers0