I'm trying to pass a date to the ISODate format using the javascript toISOString () method, the problem is that it's a bad time for me.
var fecha_hora = '2017-05-15 15:39:22'
var f = new Date(fecha_hora);
var fechaISO = f.toISOString();
console.log('fecha_hora:' + fecha_hora + '\nfecha_ISO:'+fechaISO);
prints the following string:
'fecha_hora:2017-05-15 15:39:22
fecha_ISO:2017-05-15T20:39:22.000Z'