I am using a function to convert date time into 'en-NL' format.But it gives me different result in browser and nodejs
function convertDateTime(value){
const timestamp = new Date(value);
let date = timestamp.toLocaleDateString('en-NL');
let time = timestamp.toLocaleTimeString('en-NL');
return date + ' ' + time;
}
console.log(convertDateTime(1559742499937));
when i use this function in browser it gives me following results: 05/06/2019 19:48:19 when i use this function in nodejs it gives me following result : 6/5/2019 7:48:19 PM. But my result should be same in browser and nodejs.
the locale used and the form of the string returned are entirely implementation dependent.