javascript get 24 hour time

JavaScript
var date = new Date();
console.log(date.toLocaleString('en-GB'));
var options = { hour12: false };
console.log(date.toLocaleString('en-US', options));

Source

Also in JavaScript: