(function () {
function checkTime(i) {
return (i < 10) ? "0" + i : i;
}
function startTime() {
var today = new Date(),
h = checkTime(today.getHours()),
m = checkTime(today.getMinutes()),
s = checkTime(today.getSeconds());
document.getElementById('time').innerHTML = h + ":" + m;
document.getElementById('time-2').innerHTML = ( h - 6 ) + ":" + m;
document.getElementById('time-3').innerHTML = ( h - 9 ) + ":" + m;
document.getElementById('time-4').innerHTML = ( h - 1 ) + ":" + m;
t = setTimeout(function () {
startTime()
}, 500);
}
startTime();
})();