var seconds = 0; var moscowMinutes = 09; var moscowHours = 04; //var moscowDate = '02 августа'; showDate=function() { seconds +=10; document.getElementById('moscow_time').innerHTML=""+checkTime(moscowHours)+":"+checkTime(moscowMinutes); if (seconds>=60) { seconds = 0 ++moscowMinutes; if (moscowMinutes >= 60) { moscowMinutes=0; ++moscowHours; } if (moscowHours >=24) moscowHours = 0; } } function showPMDate(){ document.getElementById('moscow_clock').style.display = 'block'; } function startTime() { showDate(); showPMDate(); setInterval(function(){showDate()},10000); } function checkTime(i) { if (i<10) { i = "0" + i; } return i; }