2016-06-17T00:00:00
and I try to convert it to date in JavaScript, so I do the following:
var data = new Date(2016-06-17T00:00:00);
It works, but the date stays different on the variable, it always changes the day. What would I have to do for the conversion to occur normally?
It does not always happen, for example in the case below it occurs: API date: 2015-07-25T00: 00: 00
var data = new Date('2015-07-25T00:00:00');
The date is as follows: Fri Jul 24 2015 21:00:00 GMT-0300 (Brazil's official time), the day is changed.
Only the next example does not occur: API Data: 2016-06-24T09: 23: 53 After converting using the same code the date stays the same: Fri Jun 24 2016 06:23:53 GMT-0300 (Brazil official time)