I have a case in which I get the difference between two dates, current date and previous date, the problem that the difference value between the dates is different between chrome and firefox, I checked, and the two dates have the same time zone, I'm not sure what is the problem, can anyone help me here??
for example:
var current_date = new Date();
current_date.setMinutes(current_date.getMinutes() + current_date.getTimezoneOffset());
var previous_date = new Date(2016,9,20,12,45,00);
previous_date .setMinutes(previous_date .getMinutes() + previous_date .getTimezoneOffset());
var diff = current_date - previous_date;
The diff value here is different in chrome from firefox.
update:
the result for the upper script:
- on chrome returns the value 2481019194
- on firefox returns the value 2481000406
Thanks