I'm creating some parsers
and was doing tests to develop Date.
This code:
value = '2015-12-31 23:16:00'
value = value.replace(/(\d{4}-\d{2}-\d{2}) ?(\d{2}:\d{2})?(:\d{2})?.*/, '$1T$2$3');
value = value.replace(/T$/, '');
value = value.replace(/(:\d{2})$/, '$1Z');
value = new Date(value)
runs correctly in Firefox, returning Date 2015-12-31T23:16:00.000Z
, however in Chrome it displays Thu Dec 31 2015 21:16:00 GMT-0200 (BRST)
In addition to showing up differently, Chrome crashed two hours into the original time.
Would anyone know how I can rev it?