JavaScript получите 24 часа
var date = new Date();
console.log(date.toLocaleString('en-GB'));
Perfect Peccary
var date = new Date();
console.log(date.toLocaleString('en-GB'));
var ts = Math.round(new Date().getTime() / 1000);
var tsYesterday = ts - (24 * 3600);
var options = { hour12: false };
console.log(date.toLocaleString('en-US', options));