javascript calculate hours from 24:00:00 code example
Example: javascript calculate 24 hours ago
var ts = Math.round(new Date().getTime() / 1000);
var tsYesterday = ts - (24 * 3600);
var ts = Math.round(new Date().getTime() / 1000);
var tsYesterday = ts - (24 * 3600);