Sequelize returning dates with wrong time

Viewed 1700

The database and node are set as -02:00 timezone.

When I save a register, using sequelize, it saves the register with the right date and time in its date fields. For example, if I save a register with the field moment set as '2017-01-15T23:59:59-0200' and look in the database via MySQL Workbench I will see 2017-01-16 00:00:00 in the respective column.

I can even correctly find registers and filter by date and time.

But the value returned by a find operation in the field is '2017-01-16T01:59:59.000Z', meaning it was added two hours to the answer.

How could I retrive the correct date and time from MySQL using Sequelize?

1 Answers
Related