I tried to experiment with calculating days, hours, minutes, and seconds between current time and a future time. but I found I always got one extra hour,
does anyone know where the problem is?

Code:
var date = new Date("12/21/2013 00:00:00 GMT-0500");
console.log(date);
var now = new Date();
console.log(nowf);
var timeDiff = date - now;
var days = Math.floor(timeDiff/(1000*60*60*24));
var hours = Math.floor((timeDiff%(1000*60*60*24))/(1000*60*60));
var minutes = Math.floor((timeDiff - (1000*60*60*24)*days - (1000*60*60)*hours)/(1000*60));
var seconds = Math.floor((timeDiff - (1000*60*60*24)*days - (1000*60*60)*hours - (1000*60)*minutes)/1000);
console.log(days + " days " + hours + " hours " + minutes + " minutes " + seconds + " seconds!");